Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.2, 10.3, 10.4, 10.5
-
None
Description
create table t1 (a int primary key, check(a<10)) engine=MyISAM; |
insert delayed into t1 values (1),(1); |
 |
# cleanup
|
drop table t1; |
INSERT DELAYED above results in the error:
10.2 3f12a596 |
At line 2: query 'insert delayed into t1 values (1),(1)' failed: 1062: Duplicate entry '1' for key 'PRIMARY' |
It shouldn't be happening if it is treated as INSERT DELAYED. If we remove CHECK from the table definition, INSERT DELAYED doesn't return the error.
The fact that DELAYED is ignored can also be observed in a more intuitive situation, if you lock the table in another client connection. Naturally INSERT DELAYED should return immediately, but with CHECK on the table it doesn't.
Reproducible with table-level and column-level check constraints, on 10.2-10.5.
Note:
It may be intentional, and if it was not, it might not be worth fixing. In this case, please re-categorize as Documentation issue, so that it's mentioned as a limitation in the documentation for CHECK constraints and for INSERT DELAYED, and reassign accordingly.