summaryrefslogtreecommitdiff
path: root/mysql-test/t/upgrade.test
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2007-10-08 02:05:10 +0400
committerunknown <kostja@bodhi.(none)>2007-10-08 02:05:10 +0400
commitded7fe7fd16d35b0a63a7a417b67fdd31df5033d (patch)
treef4b4f76a55ded111308cad01bf89cd645eae2663 /mysql-test/t/upgrade.test
parent03bef972d3b508013cfcad2de294569ecdf16158 (diff)
parentc215e78d1607a9afc55df3df3d5499d283ffed63 (diff)
downloadmariadb-git-ded7fe7fd16d35b0a63a7a417b67fdd31df5033d.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into bodhi.(none):/opt/local/work/mysql-5.1-runtime mysql-test/include/mix1.inc: Auto merged mysql-test/r/create.result: Auto merged mysql-test/r/innodb_mysql.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/t/sp.test: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_yacc.yy: Auto merged libmysql/libmysql.c: Manual merge.
Diffstat (limited to 'mysql-test/t/upgrade.test')
-rw-r--r--mysql-test/t/upgrade.test31
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`;
+