#At file:///opt/local/work/mysql-6.0-runtime/
2658 Konstantin Osipov 2008-06-27
Fix a regression introduced by WL#3726 when a table was left in the
table cache after DROP DATABASE.
Implementation of DROP DATABASE reads a list of files in the database
directory and constructs from it the list of tables to be dropped.
If the filesystem is case-insensitive and case-preserving, the
table names should be lowercased, because the same has been done
when entries for them were inserted into the table cache.
Skipping this step will lead to orphaned TABLEs left in the table cache.
Fixes lowercase_table2 failure on powermacg5.
modified:
sql/sql_db.cc
per-file messages:
sql/sql_db.cc
Lowercase the table name, it's used to construct the table cache
key.
=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc 2008-06-11 11:49:58 +0000
+++ b/sql/sql_db.cc 2008-06-27 16:10:42 +0000
@@ -1120,6 +1120,11 @@ static long mysql_rm_known_files(THD *th
(void) filename_to_tablename(file->name, table_list->table_name,
MYSQL50_TABLE_NAME_PREFIX_LENGTH +
strlen(file->name) + 1);
+
+ /* To be able to correctly look up the table in the table cache. */
+ if (lower_case_table_names)
+ my_casedn_str(files_charset_info, table_list->table_name);
+
table_list->alias= table_list->table_name; // If lower_case_table_names=2
table_list->internal_tmp_table= is_prefix(file->name, tmp_file_prefix);
/* Link into list */
| Thread |
|---|
| • bzr commit into mysql-6.0 branch (konstantin:2658) WL#3726 | Konstantin Osipov | 27 Jun |