Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.7(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL)
-
None
Description
--source include/have_innodb.inc
|
|
create table t (a int) engine=InnoDB; |
insert into t values (1),(2),(1); |
|
create table t1 (a int unique) engine=InnoDB; |
SET unique_checks=0, foreign_key_checks=0; |
insert into t1 select * from t; |
SET unique_checks=1, foreign_key_checks=1; |
select * from t1; |
|
# Cleanup
|
drop table t, t1; |
10.7.8 |
create table t (a int) engine=InnoDB; |
insert into t values (1),(2),(1); |
create table t1 (a int unique) engine=InnoDB; |
SET unique_checks=0, foreign_key_checks=0; |
insert into t1 select * from t; |
SET unique_checks=1, foreign_key_checks=1; |
select * from t1; |
a
|
drop table t, t1; |
So, the table ends up empty, but there are no hints for the user that the operation didn't succeed.
Reproducible on 10.7+. 10.6 returns a duplicate key error.
According to marko, it was likely induced by MDEV-24621.
It is somewhat similar to MDEV-31985 in the sense that the table ends up empty, however in MDEV-31985 INSERT IGNORE is used, and it at least produces a warning.
Attachments
Issue Links
- relates to
-
MDEV-33350 Bulk InnoDB LOAD DATA breaks replication upon hitting duplicate key
- Confirmed