From 897e7453d6c669f7460a242a81b874bd0302007b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 8 Nov 2001 14:17:56 +0200 Subject: Don't use IGNORE by default in INSERT ... SELECT Docs/manual.texi: Changelog mysql-test/r/insert_select.result: Add testcase for INSERT IGNORE mysql-test/t/insert_select.test: Add testcase for INSERT IGNORE --- mysql-test/r/insert_select.result | 2 ++ mysql-test/t/insert_select.test | 2 ++ 2 files changed, 4 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 682e711a6e8..d61b6c67030 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -4,6 +4,8 @@ insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7, create table t2 (payoutID SMALLINT UNSIGNED NOT NULL PRIMARY KEY); insert into t2 (payoutID) SELECT DISTINCT payoutID FROM t1; insert into t2 (payoutID) SELECT payoutID+10 FROM t1; +Duplicate entry '16' for key 1 +insert ignore into t2 (payoutID) SELECT payoutID+10 FROM t1; select * from t2; payoutID 1 diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test index 30d3e31188c..42f65858d77 100644 --- a/mysql-test/t/insert_select.test +++ b/mysql-test/t/insert_select.test @@ -7,7 +7,9 @@ create table t1 (bandID MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, payoutID SMALLI insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7,12),(8,12); create table t2 (payoutID SMALLINT UNSIGNED NOT NULL PRIMARY KEY); insert into t2 (payoutID) SELECT DISTINCT payoutID FROM t1; +--error 1062 insert into t2 (payoutID) SELECT payoutID+10 FROM t1; +insert ignore into t2 (payoutID) SELECT payoutID+10 FROM t1; select * from t2; drop table t1,t2; # -- cgit v1.2.1