diff options
Diffstat (limited to 'mysql-test/t/create.test')
| -rw-r--r-- | mysql-test/t/create.test | 48 |
1 files changed, 30 insertions, 18 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 0ffe90a2420..70acf745889 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1,3 +1,4 @@ +call mtr.add_suppression("table or database name 't-1'"); # # Check some special create statements. # @@ -55,10 +56,10 @@ create table a (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa # # Some wrong defaults, so these creates should fail too (Bug #5902) # ---error 1067 create table t1 (a datetime default now()); ---error 1294 +drop table t1; create table t1 (a datetime on update now()); +drop table t1; --error 1067 create table t1 (a int default 100 auto_increment); --error 1067 @@ -1559,29 +1560,26 @@ drop table t1,t2,t3; --echo # -- End of Bug#45829 # ---echo # new table creation/renaming blocked if old encoded table present +# new table creation/renaming is NOT blocked if old encoded table present # let $MYSQLD_DATADIR= `select @@datadir`; -create table `t-1` (a int) engine=myisam; -insert into `t-1` values (1); -show tables; -flush tables; ---echo convert table files in mysql 5.0 file name encoding ---copy_file $MYSQLD_DATADIR/test/t@002d1.MYD $MYSQLD_DATADIR/test/t-1.MYD ---copy_file $MYSQLD_DATADIR/test/t@002d1.MYI $MYSQLD_DATADIR/test/t-1.MYI ---copy_file $MYSQLD_DATADIR/test/t@002d1.frm $MYSQLD_DATADIR/test/t-1.frm ---remove_file $MYSQLD_DATADIR/test/t@002d1.MYD ---remove_file $MYSQLD_DATADIR/test/t@002d1.MYI ---remove_file $MYSQLD_DATADIR/test/t@002d1.frm +create table `#mysql50#t-1` (a int) engine=myisam; +insert into `#mysql50#t-1` values (1); show tables; ---error ER_TABLE_EXISTS_ERROR create table `t-1` (a int); +show tables; +# selects can distinguish between the two tables +select * from `t-1`; +select * from `#mysql50#t-1`; +drop table `t-1`; create table t1 (a int); ---error ER_TABLE_EXISTS_ERROR alter table t1 rename `t-1`; ---error ER_TABLE_EXISTS_ERROR +show tables; +drop table `t-1`; +create table t1 (a int); rename table t1 to `t-1`; -drop table `#mysql50#t-1`, t1; +show tables; +drop table `#mysql50#t-1`, `t-1`; --echo --echo End of 5.1 tests @@ -2016,6 +2014,8 @@ create table t1 (a int, b int); create table t1 (a int, b int) select 2,2; --error ER_TABLE_EXISTS_ERROR create table t1 like t2; +--error ER_LOCK_WAIT_TIMEOUT +create or replace table t1 (a int, b int) select 2,2; disconnect user1; connection default; select * from t1; @@ -2234,3 +2234,15 @@ alter table t1 add drop table t1; --echo End of 5.5 tests + +# +# MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS +# +--error ER_TABLE_MUST_HAVE_COLUMNS +create table t1; + +# +# MDEV-11231 Server crashes in check_duplicate_key on CREATE TABLE ... SELECT +# +create table t1 (i int, j int, key(i), key(i)) as select 1 as i, 2 as j; +drop table t1; |
