diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2009-04-10 14:25:48 +0500 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2009-04-10 14:25:48 +0500 |
commit | bb08984f07bd52690471cd9159192e74ab20ebb5 (patch) | |
tree | 02a7889f4a180d6e984e9e98ee1c8425cd8f51b1 /mysql-test/r/upgrade.result | |
parent | 214bd5a121058dfb31237c5326ad28b8c5f8eea3 (diff) | |
download | mariadb-git-bb08984f07bd52690471cd9159192e74ab20ebb5.tar.gz |
Bug#43385 Cannot ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME when Views exist
allow 'rename view' for ALTER ...UPGRADE DATA DIRECTORY NAME command.
it's safe because a view has valid internal db&table names in this case.
mysql-test/r/upgrade.result:
test result
mysql-test/t/upgrade.test:
test case
sql/sql_rename.cc:
allow 'rename view' for ALTER ...UPGRADE DATA DIRECTORY NAME command.
it's safe because a view has valid internal db&table names in this case.
Diffstat (limited to 'mysql-test/r/upgrade.result')
-rw-r--r-- | mysql-test/r/upgrade.result | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/upgrade.result b/mysql-test/r/upgrade.result index adf81efe8e3..711e69094f7 100644 --- a/mysql-test/r/upgrade.result +++ b/mysql-test/r/upgrade.result @@ -84,3 +84,23 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin2 drop database `a-b-c`; drop database `tabc`; +use `#mysql50#a-b-c`; +create table t1(f1 char(10)); +show databases like '%a-b-c%'; +Database (%a-b-c%) +#mysql50#a-b-c +ALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME; +show databases like '%a-b-c%'; +Database (%a-b-c%) +a-b-c +show create view `a-b-c`.v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `a`.`f1` AS `f1` from (`a-b-c`.`t1` `a` join `information_schema`.`tables` `b`) where (convert(`a`.`f1` using utf8) = `b`.`TABLE_NAME`) utf8 utf8_general_ci +Warnings: +Note 1600 Creation context of view `a-b-c`.`v1' is invalid +select * from `a-b-c`.v1; +f1 +Warnings: +Note 1600 Creation context of view `a-b-c`.`v1' is invalid +drop database `a-b-c`; +use test; |