summaryrefslogtreecommitdiff
path: root/mysql-test/t/insert_select.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/insert_select.test')
-rw-r--r--mysql-test/t/insert_select.test4
1 files changed, 3 insertions, 1 deletions
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test
index bcd87c2688d..fda89f18d99 100644
--- a/mysql-test/t/insert_select.test
+++ b/mysql-test/t/insert_select.test
@@ -145,7 +145,7 @@ Select null, Field, Count From t1 Where Month=20030901 and Type=2;
create table t2(No int not null, Field int not null, Count int not null);
-insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2;
+insert ignore into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2;
select * from t2;
@@ -329,11 +329,13 @@ DROP TABLE t1, t2;
# Bug#44306: Assertion fail on duplicate key error in 'INSERT ... SELECT'
# statements
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 ( a INT KEY, b INT );
INSERT INTO t1 VALUES ( 0, 1 );
--error ER_DUP_ENTRY
INSERT INTO t1 ( b ) SELECT MAX( b ) FROM t1 WHERE b = 2;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
#
# Bug #26207: inserts don't work with shortened index