diff options
Diffstat (limited to 'mysql-test/t/create.test')
-rw-r--r-- | mysql-test/t/create.test | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 0be9537350b..401920a66e4 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -70,7 +70,7 @@ create table t1 (a varchar(5) default 'abcdef'); create table t1 (a varchar(5) default 'abcde'); insert into t1 values(); select * from t1; ---error 1067 +--error ER_DATA_TOO_LONG alter table t1 alter column a set default 'abcdef'; drop table t1; @@ -402,7 +402,9 @@ select * from t2; drop table t1, t2; create table t1 (a tinyint, b smallint, c mediumint, d int, e bigint, f float(3,2), g double(4,3), h decimal(5,4), i year, j date, k timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, l datetime, m enum('a','b'), n set('a','b'), o char(10)); +set sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t2 select ifnull(a,a), ifnull(b,b), ifnull(c,c), ifnull(d,d), ifnull(e,e), ifnull(f,f), ifnull(g,g), ifnull(h,h), ifnull(i,i), ifnull(j,j), ifnull(k,k), ifnull(l,l), ifnull(m,m), ifnull(n,n), ifnull(o,o) from t1; +set sql_mode = DEFAULT; show create table t2; drop table t1,t2; @@ -431,8 +433,12 @@ drop table t1, t2; # create table t1(cenum enum('a'), cset set('b')); +set sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t2(cenum enum('a','a'), cset set('b','b')); create table t3(cenum enum('a','A','a','c','c'), cset set('b','B','b','d','d')); +set sql_mode = DEFAULT; +--error ER_DUPLICATED_VALUE_IN_TYPE +create table t4(cenum enum('a','a'), cset set('b','b')); drop table t1, t2, t3; # @@ -612,11 +618,13 @@ create table t1 ( show create table t1; drop table t1; +set sql_mode = 'NO_ENGINE_SUBSTITUTION'; #--warning 1364 create table t1 ( a varchar(12) charset utf8 collate utf8_bin not null, b int not null, primary key (a) ) select a, 1 as c from t2 ; +set sql_mode = DEFAULT; show create table t1; drop table t1; @@ -1104,9 +1112,9 @@ DROP TABLE IF EXISTS t3; --enable_warnings --echo - +SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE TABLE t1(c1 TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, c2 TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'); - +SET sql_mode = DEFAULT; --echo SET sql_mode = NO_ZERO_DATE; @@ -1731,7 +1739,9 @@ drop table t1; # MDEV-7050: MySQL#74603 - Assertion `comma_length > 0' failed in mysql_prepare_create_table # set @@session.collation_server=filename; +set sql_mode = 'NO_ENGINE_SUBSTITUTION'; create table t1(a enum('','')); +set sql_mode = DEFAULT; drop table t1; set @@session.collation_server=default; |