Open mrigger opened 4 years ago
/bug P1
I think it is fixed by https://github.com/pingcap/tidb/pull/17217. I've just tested it.
mysql> CREATE TABLE t0(c0 INT AS ('a') UNIQUE, c1 INT);
Query OK, 0 rows affected (0.01 sec)
mysql> INSERT IGNORE INTO t0(c1) VALUES (0);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> DELETE FROM t0;
Query OK, 1 row affected (0.00 sec)
mysql> INSERT IGNORE INTO t0(c1) VALUES (0) ON DUPLICATE KEY UPDATE c1=t0.c0;
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> show warnings;
+---------+------+--------------------------------------+
| Level | Code | Message |
+---------+------+--------------------------------------+
| Warning | 1292 | Truncated incorrect FLOAT value: 'a' |
+---------+------+--------------------------------------+
1 row in set (0.00 sec)
Could it be closed? @shuke987 @mrigger
Thanks for fixing! Closing the issue works for me. Would you consider this bug report to be a duplicate bug report?
Yes, it does duplicate bug report, it just behaves differently. However, I found that I couldn't change the label of the issue. Maybe @shuke987 can help tag it and close the issue.
Consider the following statements:
I would expect the statements to execute without errors. However, TiDB prints an error
key not exist
:When using MySQL 8.0.19, the
INSERT
executes without an error:I found this based on the latest master commit 187f225002b67daa47992816f6ef5ddb76b0f68a, and also checked that this reproduces on the 4.0 RC.