1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00
BUG #2397 "RENAME TABLES is not blocked by FLUSH TABLES WITH READ LOCK"
(added waiting for global_read_lock in mysql_rename_tables)
This commit is contained in:
vva@eagle.mysql.r18.ru
2004-04-01 22:47:09 +05:00
parent 3bfbe6e0dd
commit 7a580ce991
3 changed files with 41 additions and 0 deletions

View File

@@ -46,6 +46,8 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list)
DBUG_RETURN(1);
}
if (wait_if_global_read_lock(thd,0))
DBUG_RETURN(1);
VOID(pthread_mutex_lock(&LOCK_open));
if (lock_table_names(thd, table_list))
goto err;
@@ -93,6 +95,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list)
err:
pthread_mutex_unlock(&LOCK_open);
start_waiting_global_read_lock(thd);
DBUG_RETURN(error);
}