summaryrefslogtreecommitdiff
path: root/sql/sql_rename.cc
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2010-08-10 13:16:44 +0200
committerJon Olav Hauglid <jon.hauglid@oracle.com>2010-08-10 13:16:44 +0200
commit756f992fe5c7cae5c7aaa062083a2f1b0e2ed2ae (patch)
tree10bccf2012cc36e5166499fedcd9a1b059a14d45 /sql/sql_rename.cc
parentf8bfa3287ded5212a28c6d4bbf2d4afee8e5c403 (diff)
downloadmariadb-git-756f992fe5c7cae5c7aaa062083a2f1b0e2ed2ae.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.cc2
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);