summaryrefslogtreecommitdiff
path: root/mysql-test/t/create.test
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-05-16 14:05:45 +0300
committerMichael Widenius <monty@askmonty.org>2011-05-16 14:05:45 +0300
commitf458e198c0bea67c6a3787738108bbfb139639bd (patch)
treee01d8c096a63bacfb5895de6e55d011d666e9d38 /mysql-test/t/create.test
parent8c5e18c9cfde61197a9f653efa08450ae9a6ce0a (diff)
parent19f0d6b2d9930f83688943b8f98a8b7397584df9 (diff)
downloadmariadb-git-f458e198c0bea67c6a3787738108bbfb139639bd.tar.gz
Merge with 5.2
Diffstat (limited to 'mysql-test/t/create.test')
-rw-r--r--mysql-test/t/create.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index b59fa9edb9f..8f39fb0e0b9 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -1534,5 +1534,30 @@ drop table t1,t2,t3;
--echo
--echo # -- End of Bug#45829
+#
+--echo # new table creation/renaming 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
+show tables;
+--error ER_TABLE_EXISTS_ERROR
+create table `t-1` (a int);
+create table t1 (a int);
+--error ER_TABLE_EXISTS_ERROR
+alter table t1 rename `t-1`;
+--error ER_TABLE_EXISTS_ERROR
+rename table t1 to `t-1`;
+drop table `#mysql50#t-1`, t1;
+
--echo
--echo End of 5.1 tests