1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Followup for Bug #54360 Deadlock DROP/ALTER/CREATE DATABASE

with open HANDLER

This patch changes the code for table renames to not drop metadata
locks. Since table renames are done as a part of ALTER DATABASE ...
UPGRADE, dropping metadata locks in the middle of execution can
result in wrong binlog order since it means that no locks are held
when the binlog is written to.

The RENAME TABLE statement is unafffected since it auto commits and
therefore already drops metadata locks at the end of execution.

This patch also reverts the regression test for Bug#48940 back to
its original version. The test was temporarily changed due to the
issue mentioned above.
This commit is contained in:
Jon Olav Hauglid
2010-08-10 13:16:44 +02:00
parent 523066987d
commit cff7f022d8
4 changed files with 12 additions and 12 deletions

View File

@ -188,8 +188,6 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent)
if (!error)
query_cache_invalidate3(thd, table_list, 0);
thd->mdl_context.release_transactional_locks();
err:
thd->global_read_lock.start_waiting_global_read_lock(thd);
DBUG_RETURN(error || binlog_error);