1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +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()


BitKeeper/etc/ignore:
  added tests/bug25714
sql/lock.cc:
  Added comment
sql/log.cc:
  Don't save & restore time fields from thd when it's not needed.
  Fix that we properly detect if open table failed
sql/sql_base.cc:
  Added back setting of 'some_tables_deleted' to not cause deadlocks in
  mysql_lock_table()
This commit is contained in:
unknown
2007-08-02 10:50:00 +03:00
parent 926664fe2c
commit dcf1fd73d9
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"));