diff options
Diffstat (limited to 'mysql-test/t/create.test')
-rw-r--r-- | mysql-test/t/create.test | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 4467de9a278..3545d190f06 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1558,6 +1558,31 @@ 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 @@ -1743,7 +1768,7 @@ INSERT INTO t1 VALUES (1), (1); INSERT INTO t2 VALUES (2), (2); CREATE VIEW v1 AS SELECT id FROM t2; -CREATE TABLE IF NOT EXISTS v1(a int, b int) SELECT id, id FROM t1; +CREATE TABLE IF NOT EXISTS v1(a int, b int) SELECT id, id as di FROM t1; SHOW CREATE TABLE v1; SELECT * FROM t2; SELECT * FROM v1; |