mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02: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:
parent
523066987d
commit
cff7f022d8
4 changed files with 12 additions and 12 deletions
|
|
@ -16,21 +16,19 @@ drop schema foo;
|
|||
# Bug #48940 MDL deadlocks against mysql_rm_db
|
||||
#
|
||||
DROP SCHEMA IF EXISTS schema1;
|
||||
DROP SCHEMA IF EXISTS schema2;
|
||||
# Connection default
|
||||
CREATE SCHEMA schema1;
|
||||
CREATE SCHEMA schema2;
|
||||
CREATE TABLE schema1.t1 (a INT);
|
||||
SET autocommit= FALSE;
|
||||
INSERT INTO schema1.t1 VALUES (1);
|
||||
# Connection 2
|
||||
DROP SCHEMA schema1;
|
||||
# Connection default
|
||||
ALTER SCHEMA schema2 DEFAULT CHARACTER SET utf8;
|
||||
ALTER SCHEMA schema1 DEFAULT CHARACTER SET utf8;
|
||||
Got one of the listed errors
|
||||
SET autocommit= TRUE;
|
||||
# Connection 2
|
||||
# Connection default
|
||||
DROP SCHEMA schema2;
|
||||
#
|
||||
# Bug #49988 MDL deadlocks with mysql_create_db, reload_acl_and_cache
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue