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 /mysql-test/t/schema.test | |
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 'mysql-test/t/schema.test')
-rw-r--r-- | mysql-test/t/schema.test | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mysql-test/t/schema.test b/mysql-test/t/schema.test index 7da02979943..6af7ee20b02 100644 --- a/mysql-test/t/schema.test +++ b/mysql-test/t/schema.test @@ -23,7 +23,6 @@ drop schema foo; --disable_warnings DROP SCHEMA IF EXISTS schema1; -DROP SCHEMA IF EXISTS schema2; --enable_warnings connect(con2, localhost, root); @@ -32,7 +31,6 @@ connect(con2, localhost, root); connection default; CREATE SCHEMA schema1; -CREATE SCHEMA schema2; CREATE TABLE schema1.t1 (a INT); SET autocommit= FALSE; @@ -48,7 +46,10 @@ let $wait_condition= SELECT COUNT(*)= 1 FROM information_schema.processlist WHERE state= 'Waiting for table metadata lock' AND info='DROP SCHEMA schema1'; --source include/wait_condition.inc -ALTER SCHEMA schema2 DEFAULT CHARACTER SET utf8; +# Error 1 is from ALTER DATABASE when the database does not exist. +# Listing the error twice to prevent result diffences based on filename. +--error 1,1 +ALTER SCHEMA schema1 DEFAULT CHARACTER SET utf8; SET autocommit= TRUE; --echo # Connection 2 @@ -57,7 +58,6 @@ connection con2; --echo # Connection default connection default; -DROP SCHEMA schema2; disconnect con2; |