diff options
Diffstat (limited to 'mysql-test/r/insert.result')
-rw-r--r-- | mysql-test/r/insert.result | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index a722ab8d97f..82f3977e231 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -697,3 +697,23 @@ ERROR 42000: Column 'a' specified twice INSERT IGNORE t1 (a, a) SELECT 1,1 UNION SELECT 2,2; ERROR 42000: Column 'a' specified twice DROP TABLE t1; +# +# MDEV-5168: Ensure that we can disable duplicate key warnings +# from INSERT IGNORE +# +create table t1 (f1 int unique, f2 int unique); +insert into t1 values (1,12); +insert into t1 values (2,13); +insert into t1 values (1,12); +ERROR 23000: Duplicate entry '1' for key 'f1' +insert ignore into t1 values (1,12); +Warnings: +Warning 1062 Duplicate entry '1' for key 'f1' +set @@old_mode="NO_DUP_KEY_WARNINGS_WITH_IGNORE"; +insert ignore into t1 values (1,12); +insert ignore into t1 values (1,12) on duplicate key update f2=13; +set @@old_mode=""; +insert ignore into t1 values (1,12); +Warnings: +Warning 1062 Duplicate entry '1' for key 'f1' +DROP TABLE t1; |