diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-08-10 13:16:44 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-08-10 13:16:44 +0200 |
commit | cff7f022d8d940584f4be1f831b40fda4cbd4ec2 (patch) | |
tree | 10bccf2012cc36e5166499fedcd9a1b059a14d45 /sql/sql_rename.cc | |
parent | 523066987d6150347b3a56d403187312816cab8d (diff) | |
download | mariadb-git-cff7f022d8d940584f4be1f831b40fda4cbd4ec2.tar.gz |
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.
Diffstat (limited to 'sql/sql_rename.cc')
-rw-r--r-- | sql/sql_rename.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc index f0b53abcb03..97f8e46d052 100644 --- a/sql/sql_rename.cc +++ b/sql/sql_rename.cc @@ -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); |