diff options
author | unknown <sanja@askmonty.org> | 2011-05-11 14:09:48 +0300 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2011-05-11 14:09:48 +0300 |
commit | 520927a7df486a1a21f87dadd9c5a920bf583917 (patch) | |
tree | 22d6d45d1f035091b578b5f74d64828f584d83de /mysql-test/t/create.test | |
parent | e2ff2885319e480477e8f7d2824065ee4f4363a6 (diff) | |
download | mariadb-git-520927a7df486a1a21f87dadd9c5a920bf583917.tar.gz |
Bugfix: New table creation/renaming block added if old encoded table present.
mysql-test/r/create.result:
test of renaming
mysql-test/r/upgrade.result:
Now such behaviour prohibited to avoid problems.
mysql-test/t/create.test:
test of renaming
mysql-test/t/upgrade.test:
Now such behaviour prohibited to avoid problems.
sql/mysql_priv.h:
Function to test table name presence added.
sql/sql_rename.cc:
Rename fixed.
sql/sql_table.cc:
Function to test table name presence added.
Create fixed.
Diffstat (limited to 'mysql-test/t/create.test')
-rw-r--r-- | mysql-test/t/create.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index f3cd48af543..fa991aab0d7 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 |