summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2015-01-19 14:19:14 +0100
committerSergei Golubchik <sergii@pisem.net>2015-01-19 14:19:14 +0100
commit73ebabd2eea6db71db2270e855a4af9630306a54 (patch)
tree2a23feeff8b88e0b3db824a7f16b6db40b4de085 /mysql-test/t
parentc75eec8e0de23a6314ce021bafeb4ab4eeb1105f (diff)
downloadmariadb-git-73ebabd2eea6db71db2270e855a4af9630306a54.tar.gz
MDEV-7299 Assertion `m_status == DA_ERROR || m_status == DA_OK' fails on concurrent execution of DDL, queries from I_S, and KILL QUERY
Fix MDL to report an error when a wait was killed, but preserve the old documented behavior of GET_LOCK() where killing it is not an error. Also remove race conditions in main.create_or_replace test
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/create_or_replace.test10
1 files changed, 8 insertions, 2 deletions
diff --git a/mysql-test/t/create_or_replace.test b/mysql-test/t/create_or_replace.test
index 2bdd23c21f6..9e37950dbef 100644
--- a/mysql-test/t/create_or_replace.test
+++ b/mysql-test/t/create_or_replace.test
@@ -346,20 +346,26 @@ LOCK TABLE t1 WRITE;
--let $con_id = `SELECT CONNECTION_ID()`
--send CREATE OR REPLACE TABLE t1 LIKE tmp
--connection default
+let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist
+ WHERE state= 'Waiting for table metadata lock';
+--source include/wait_condition.inc
--replace_result $con_id con_id
--eval KILL QUERY $con_id
--connection con1
---error 0,ER_QUERY_INTERRUPTED
+--error ER_QUERY_INTERRUPTED
--reap
--send CREATE OR REPLACE TABLE t1 (a int)
--connection default
+let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist
+ WHERE state= 'Waiting for table metadata lock';
+--source include/wait_condition.inc
--replace_result $con_id con_id
--eval KILL QUERY $con_id
--connection con1
---error 0,ER_QUERY_INTERRUPTED
+--error ER_QUERY_INTERRUPTED
--reap
--disconnect con1
--connection default