diff options
author | Monty <monty@mariadb.org> | 2020-03-26 19:39:51 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-03-26 19:39:51 +0200 |
commit | 0fb84216a35046a4574dec214dcce03130a797c1 (patch) | |
tree | e7f3f37f210a27619ba6e4f7661a2b2fae9c308f | |
parent | caf110fa5226870dc2e4b00139b566ac872c943f (diff) | |
download | mariadb-git-0fb84216a35046a4574dec214dcce03130a797c1.tar.gz |
Make mysql.innodb_mysql_lock deterministic
MDEV-7861 main.innodb_mysql_lock fails sporadically in buildbot
-rw-r--r-- | mysql-test/main/innodb_mysql_lock.result | 1 | ||||
-rw-r--r-- | mysql-test/main/innodb_mysql_lock.test | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/mysql-test/main/innodb_mysql_lock.result b/mysql-test/main/innodb_mysql_lock.result index 584ab19b2ee..25cf2882cd0 100644 --- a/mysql-test/main/innodb_mysql_lock.result +++ b/mysql-test/main/innodb_mysql_lock.result @@ -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. diff --git a/mysql-test/main/innodb_mysql_lock.test b/mysql-test/main/innodb_mysql_lock.test index 24ace437c50..6e746468dba 100644 --- a/mysql-test/main/innodb_mysql_lock.test +++ b/mysql-test/main/innodb_mysql_lock.test @@ -1,3 +1,4 @@ +--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 |