mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Fix table renaming to not lowercase table names for all storage
engines when lower_case_table_names == 2, as it did previously for InnoDB and MEMORY. (Bug #9660) mysql-test/r/lowercase_table2.result: Fix results sql/sql_table.cc: Add build_table_path() function to construct the path to a table, and use it to replace nearly all of the places where this was done with similar code. Fix mysql_rename_table() to not lowercase the .frm file name when lower_case_table_names == 2 and the storage engine does not set the HA_FILE_BASED flag (such as InnoDB).
This commit is contained in:
parent
edcc645b8e
commit
8ac75806e2
2 changed files with 79 additions and 59 deletions
|
|
@ -72,7 +72,7 @@ T1 CREATE TABLE `T1` (
|
|||
RENAME TABLE T1 TO T2;
|
||||
SHOW TABLES LIKE "T2";
|
||||
Tables_in_test (T2)
|
||||
t2
|
||||
T2
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
1
|
||||
|
|
@ -83,25 +83,25 @@ t3
|
|||
RENAME TABLE T3 TO T1;
|
||||
SHOW TABLES LIKE "T1";
|
||||
Tables_in_test (T1)
|
||||
t1
|
||||
T1
|
||||
ALTER TABLE T1 add b int;
|
||||
SHOW TABLES LIKE "T1";
|
||||
Tables_in_test (T1)
|
||||
t1
|
||||
T1
|
||||
ALTER TABLE T1 RENAME T2;
|
||||
SHOW TABLES LIKE "T2";
|
||||
Tables_in_test (T2)
|
||||
t2
|
||||
T2
|
||||
LOCK TABLE T2 WRITE;
|
||||
ALTER TABLE T2 drop b;
|
||||
SHOW TABLES LIKE "T2";
|
||||
Tables_in_test (T2)
|
||||
t2
|
||||
T2
|
||||
UNLOCK TABLES;
|
||||
RENAME TABLE T2 TO T1;
|
||||
SHOW TABLES LIKE "T1";
|
||||
Tables_in_test (T1)
|
||||
t1
|
||||
T1
|
||||
SELECT * from T1;
|
||||
a
|
||||
1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue