mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix removal of tables from cache when the database they are contained
within is dropped and lower_case_table_names is set. (Bug #8355)
This commit is contained in:
@ -2864,8 +2864,18 @@ static void mysql_rm_tmp_tables(void)
|
||||
** and afterwards delete those marked unused.
|
||||
*/
|
||||
|
||||
void remove_db_from_cache(const my_string db)
|
||||
void remove_db_from_cache(const char *db)
|
||||
{
|
||||
char name_buff[NAME_LEN+1];
|
||||
if (db && lower_case_table_names)
|
||||
{
|
||||
/*
|
||||
convert database to lower case for comparision.
|
||||
*/
|
||||
strmake(name_buff, db, sizeof(name_buff)-1);
|
||||
my_casedn_str(files_charset_info, name_buff);
|
||||
db= name_buff;
|
||||
}
|
||||
for (uint idx=0 ; idx < open_cache.records ; idx++)
|
||||
{
|
||||
TABLE *table=(TABLE*) hash_element(&open_cache,idx);
|
||||
|
Reference in New Issue
Block a user