Commit 0fb84216 authored by Monty's avatar Monty

Make mysql.innodb_mysql_lock deterministic

MDEV-7861 main.innodb_mysql_lock fails sporadically in buildbot
parent caf110fa
......@@ -21,6 +21,7 @@ connection con3;
set @@autocommit=0;
DROP TABLE t1;
connection con1;
# Waiting for until transaction will be locked inside innodb subsystem
# Connection 1 is now holding the lock.
# Issuing insert from connection 1 while connection 2&3
# is waiting for the lock should give a deadlock error.
......
--source include/have_metadata_lock_info.inc
-- source include/have_innodb.inc
# Save the initial number of concurrent sessions.
......@@ -36,10 +37,12 @@ set @@autocommit=0;
--send DROP TABLE t1
connection con1;
--echo # Waiting for until transaction will be locked inside innodb subsystem
let $wait_condition=
SELECT COUNT(*) = 1 FROM information_schema.processlist
WHERE info = "INSERT INTO t1 VALUES (1)" and
state = "update";
SELECT COUNT(*) = 1 FROM information_schema.innodb_trx
WHERE trx_query = 'INSERT INTO t1 VALUES (1)' AND
trx_operation_state = 'inserting' AND
trx_state = 'LOCK WAIT';
--source include/wait_condition.inc
let $wait_condition=
SELECT COUNT(*) = 1 FROM information_schema.processlist
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment