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

Don't save & restore time fields from thd when it's not needed.

Added back setting of 'some_tables_deleted' to not cause deadlocks in mysql_lock_table()
This commit is contained in:
monty@mysql.com/nosik.monty.fi
2007-08-02 10:50:00 +03:00
parent 93f0771fca
commit 0174fa66d5
4 changed files with 21 additions and 38 deletions

View File

@ -7198,6 +7198,12 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name,
else if (in_use != thd)
{
DBUG_PRINT("info", ("Table was in use by other thread"));
/*
Mark that table is going to be deleted from cache. This will
force threads that are in mysql_lock_tables() (but not yet
in thr_multi_lock()) to abort it's locks, close all tables and retry
*/
in_use->some_tables_deleted= 1;
if (table->is_name_opened())
{
DBUG_PRINT("info", ("Found another active instance of the table"));