diff options
Diffstat (limited to 'mysql-test/t/upgrade.test')
-rw-r--r-- | mysql-test/t/upgrade.test | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/t/upgrade.test b/mysql-test/t/upgrade.test index f517c7787f8..40bd17fc3a5 100644 --- a/mysql-test/t/upgrade.test +++ b/mysql-test/t/upgrade.test @@ -56,3 +56,34 @@ system cp $MYSQL_TEST_DIR/std_data/old_table-323.frm $MYSQLTEST_VARDIR/master-da truncate t1; drop table t1; +# +# Bug#28360 (RENAME DATABASE destroys routines) +# + + +--disable_warnings +drop database if exists `tabc`; +drop database if exists `a-b-c`; +--enable_warnings + +create database `tabc` default character set latin2; +create table tabc.t1 (a int); +FLUSH TABLES; + +# Manually make a 5.0 database from the template +--exec mkdir $MYSQLTEST_VARDIR/master-data/a-b-c +--copy_file $MYSQLTEST_VARDIR/master-data/tabc/db.opt $MYSQLTEST_VARDIR/master-data/a-b-c/db.opt +--copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.frm $MYSQLTEST_VARDIR/master-data/a-b-c/t1.frm +--copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.MYD $MYSQLTEST_VARDIR/master-data/a-b-c/t1.MYD +--copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.MYI $MYSQLTEST_VARDIR/master-data/a-b-c/t1.MYI + +show databases like '%a-b-c%'; +ALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME; +# The physical directory name is now a@002db@002dc, the logical name still a-b-c +show databases like '%a-b-c%'; +show create database `a-b-c`; +show tables in `a-b-c`; +show create table `a-b-c`.`t1`; +drop database `a-b-c`; +drop database `tabc`; + |