Bug #118630 | INSERT IGNORE failed but insert a different value | ||
---|---|---|---|
Submitted: | 10 Jul 9:05 | Modified: | 23 Jul 1:36 |
Reporter: | chi zhang | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 9.3.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[10 Jul 9:05]
chi zhang
[22 Jul 12:58]
MySQL Verification Team
Hello Chi Zhang, Thank you for the bug report. Imho this is not a bug, please see the doc https://dev.mysql.com/doc/refman/9.3/en/sql-mode.html#ignore-effect-on-execution If the SQL mode is not strict, IGNORE causes the NULL to be inserted as the column implicit default (0 in this case), which enables the row to be handled without skipping it. Regards, Ashwini Patil
[23 Jul 1:36]
chi zhang
Hi, Thanks for your work on analyzing this test case! For the second query in this test case, the predicate should be false, as there is only `0` in `t0.c0`, so `(NULL) NOT IN (t0.c0)` should be true, `(t0.c0) NOT IN (CAST(0.1 AS DOUBLE))` should be true, and the whole predicate `NOT (((NULL) NOT IN (t0.c0)) && ((t0.c0) NOT IN (CAST(0.1 AS DOUBLE))))` should be false, however, the second query still return 1 row.