summaryrefslogtreecommitdiff
path: root/mysql-test/t/mdl_sync.test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-05-08 10:25:24 +0200
committerSergei Golubchik <sergii@pisem.net>2014-05-08 10:25:24 +0200
commit3e7519f17efde2d7fb416c673644e8dd7bd3eab1 (patch)
tree6258d0f70d17896564b44d5f437469b37b45aa5c /mysql-test/t/mdl_sync.test
parentc8ee83ee8a47f2aef311b2e3d78f69448cd8a1f1 (diff)
downloadmariadb-git-3e7519f17efde2d7fb416c673644e8dd7bd3eab1.tar.gz
fix mdl_sync test to work now when ALTER TABLE .. ENGINE=xxx may be executed online
Diffstat (limited to 'mysql-test/t/mdl_sync.test')
-rw-r--r--mysql-test/t/mdl_sync.test11
1 files changed, 9 insertions, 2 deletions
diff --git a/mysql-test/t/mdl_sync.test b/mysql-test/t/mdl_sync.test
index d5cfab2fac9..8e809788a08 100644
--- a/mysql-test/t/mdl_sync.test
+++ b/mysql-test/t/mdl_sync.test
@@ -4750,6 +4750,7 @@ INSERT INTO t2 VALUES (3), (4);
connect(con1, localhost, root);
connect(con2, localhost, root);
+connect(con3, localhost, root);
--echo # Connection con1
connection con1;
@@ -4769,7 +4770,7 @@ SET DEBUG_SYNC= 'now WAIT_FOR upgrade';
--send DELETE FROM t2 WHERE a = 3
--echo # Connection default
-connection default;
+connection con3;
--echo # Check that DELETE is waiting on a metadata lock and not a table lock.
let $wait_condition=
SELECT COUNT(*) = 1 FROM information_schema.processlist
@@ -4779,7 +4780,9 @@ let $wait_condition=
--echo # Now that DELETE blocks on a metadata lock, we should be able to do
--echo # SELECT * FROM m1 here. SELECT used to be blocked by a DELETE table
--echo # lock request.
-SELECT * FROM m1;
+--send SELECT * FROM m1 WHERE a < 3
+
+connection default;
--echo # Resuming ALTER TABLE
SET DEBUG_SYNC= 'now SIGNAL continue';
@@ -4791,12 +4794,16 @@ connection con1;
connection con2;
--echo # Reaping: DELETE FROM t2 WHERE a = 3
--reap
+connection con3;
+--echo # Reaping: SELECT * FROM m1 WHERE a < 3
+--reap
--echo # Connection default
connection default;
DROP TABLE m1, t1, t2;
SET DEBUG_SYNC= 'RESET';
disconnect con1;
disconnect con2;
+disconnect con3;
# Check that all connections opened by test cases in this file are really