mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-32025 Crashes in MDL_key::mdl_key_init with lower-case-table-names=2
Backporting a part of MDEV-32026 (which also fixed MDEV-32025 in 11.3) from 11.3 to 10.4. The reported crash happened with --lower-case-table-names=2 on statements like: ALTER DATABASE Db1 DEFAULT CHARACTER SET utf8; ALTER DATABASE `#mysql50#D+b1` UPGRADE DATA DIRECTORY NAME; lock_schema_name() expects a normalized database name and assert if a non-normalized name comes. mysql_alter_db_internal() and mysql_upgrade_db() get a non-normalized database name in the parameter. Fixing them to normalize the database name before passing it to lock_schema_name().
This commit is contained in:
21
mysql-test/main/lowercase_table2.result
Normal file → Executable file
21
mysql-test/main/lowercase_table2.result
Normal file → Executable file
@ -358,3 +358,24 @@ disconnect conn1;
|
||||
drop user 'mysqltest_1'@'localhost';
|
||||
drop tables a, B;
|
||||
drop database db1;
|
||||
#
|
||||
# MDEV-32025 Crashes in MDL_key::mdl_key_init with lower-case-table-names=2
|
||||
#
|
||||
CREATE DATABASE `#mysql50#D+b1`;
|
||||
ALTER DATABASE `#mysql50#D+b1` UPGRADE DATA DIRECTORY NAME;
|
||||
SHOW CREATE DATABASE `D+b1`;
|
||||
Database Create Database
|
||||
D+b1 CREATE DATABASE `D+b1` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */
|
||||
SHOW CREATE DATABASE `d+b1`;
|
||||
Database Create Database
|
||||
d+b1 CREATE DATABASE `d+b1` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */
|
||||
DROP DATABASE `D+b1`;
|
||||
CREATE DATABASE Db1;
|
||||
ALTER DATABASE Db1 DEFAULT CHARACTER SET utf8;
|
||||
SHOW CREATE DATABASE Db1;
|
||||
Database Create Database
|
||||
Db1 CREATE DATABASE `Db1` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci */
|
||||
SHOW CREATE DATABASE db1;
|
||||
Database Create Database
|
||||
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci */
|
||||
DROP DATABASE Db1;
|
||||
|
Reference in New Issue
Block a user