diff options
Diffstat (limited to 'mysql-test/t/insert_select.test')
-rw-r--r-- | mysql-test/t/insert_select.test | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test index bcd87c2688d..b32e25763cf 100644 --- a/mysql-test/t/insert_select.test +++ b/mysql-test/t/insert_select.test @@ -21,6 +21,7 @@ drop table t1,t2; # test case by Fournier Jocelyn <joc@presence-pc.com> # +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE `t1` ( `numeropost` bigint(20) unsigned NOT NULL default '0', `icone` tinyint(4) unsigned NOT NULL default '0', @@ -36,7 +37,9 @@ CREATE TABLE `t1` ( KEY `pseudo` (`pseudo`), KEY `numreponse` (`numreponse`) ) ENGINE=MyISAM; +SET sql_mode = DEFAULT; +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE `t2` ( `numeropost` bigint(20) unsigned NOT NULL default '0', `icone` tinyint(4) unsigned NOT NULL default '0', @@ -52,6 +55,7 @@ CREATE TABLE `t2` ( KEY `pseudo` (`pseudo`), KEY `numreponse` (`numreponse`) ) ENGINE=MyISAM; +SET sql_mode = DEFAULT; INSERT INTO t2 (numeropost,icone,numreponse,contenu,pseudo,date,ip,signature) VALUES @@ -145,7 +149,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 +333,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 |