mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug #53804: serious flaws in the alter database .. upgrade
data directory name command The check_db_name function has been modified to validate tails of #mysql50#-prefixed database names for compliance with MySQL 5.0 database name encoding rules (the check_table_name function call has been reused).
This commit is contained in:
@@ -44,7 +44,7 @@ ALTER DATABASE `#mysql41#not-supported` UPGRADE DATA DIRECTORY NAME;
|
||||
--error ER_WRONG_USAGE
|
||||
ALTER DATABASE `#mysql51#not-yet` UPGRADE DATA DIRECTORY NAME;
|
||||
|
||||
--error ER_WRONG_USAGE
|
||||
--error ER_WRONG_DB_NAME
|
||||
ALTER DATABASE `#mysql50#` UPGRADE DATA DIRECTORY NAME;
|
||||
|
||||
--error ER_BAD_DB_ERROR
|
||||
|
||||
@@ -137,3 +137,37 @@ select * from `a-b-c`.v1;
|
||||
--enable_ps_protocol
|
||||
drop database `a-b-c`;
|
||||
use test;
|
||||
|
||||
--echo # End of 5.0 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug #53804: serious flaws in the alter database .. upgrade data
|
||||
--echo # directory name command
|
||||
--echo #
|
||||
|
||||
--error ER_BAD_DB_ERROR
|
||||
ALTER DATABASE `#mysql50#:` UPGRADE DATA DIRECTORY NAME;
|
||||
--error ER_WRONG_DB_NAME
|
||||
ALTER DATABASE `#mysql50#.` UPGRADE DATA DIRECTORY NAME;
|
||||
--error ER_WRONG_DB_NAME
|
||||
ALTER DATABASE `#mysql50#../` UPGRADE DATA DIRECTORY NAME;
|
||||
--error ER_WRONG_DB_NAME
|
||||
ALTER DATABASE `#mysql50#../..` UPGRADE DATA DIRECTORY NAME;
|
||||
--error ER_WRONG_DB_NAME
|
||||
ALTER DATABASE `#mysql50#../../` UPGRADE DATA DIRECTORY NAME;
|
||||
--error ER_WRONG_DB_NAME
|
||||
ALTER DATABASE `#mysql50#./blablabla` UPGRADE DATA DIRECTORY NAME;
|
||||
--error ER_WRONG_DB_NAME
|
||||
ALTER DATABASE `#mysql50#../blablabla` UPGRADE DATA DIRECTORY NAME;
|
||||
--error ER_WRONG_DB_NAME
|
||||
ALTER DATABASE `#mysql50#/` UPGRADE DATA DIRECTORY NAME;
|
||||
--error ER_WRONG_DB_NAME
|
||||
ALTER DATABASE `#mysql50#/.` UPGRADE DATA DIRECTORY NAME;
|
||||
|
||||
--error ER_WRONG_DB_NAME
|
||||
USE `#mysql50#.`;
|
||||
--error ER_WRONG_DB_NAME
|
||||
USE `#mysql50#../blablabla`;
|
||||
|
||||
--echo # End of 5.1 tests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user