1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-17148 DROP DATABASE throw "Directory not empty" after changed lower_case_table_names.

No need to lowercase table names on case-sensitive file systems, as the
cache won't contain the 'lowercased' table anyway. And it prevents the
UPPERCASE.frm from being deleted.
This commit is contained in:
Alexey Botchkov
2019-02-01 17:10:27 +04:00
parent 7c7161a1bd
commit 09cea8703f
3 changed files with 22 additions and 2 deletions

View File

@ -1107,8 +1107,12 @@ static bool find_db_tables_and_rm_known_files(THD *thd, MY_DIR *dirp,
table_list->table_name_length= table->length;
table_list->open_type= OT_BASE_ONLY;
/* To be able to correctly look up the table in the table cache. */
if (lower_case_table_names)
/*
On the case-insensitive file systems table is opened
with the lowercased file name. So we should lowercase
as well to look up the cache properly.
*/
if (lower_case_file_system)
table_list->table_name_length= my_casedn_str(files_charset_info,
table_list->table_name);