Skip to content

Commit 069b510

Browse files
MDEV-37141 DML committed within XA transaction block after deadlock error and implicit rollback
Fix Test issue: In innodb.trx_deadlock wait for INFORMATION_SCHEMA.INNODB_LOCKS cache to clear.
1 parent d66a74a commit 069b510

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

mysql-test/suite/innodb/r/trx_deadlock.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ SELECT * FROM t1;
4949
col1 col2
5050
1 1
5151
2 2
52+
# Wait for information schema cache for locks to get cleared
5253
connection con1;
5354
XA BEGIN 'x1';
5455
# XA Trx-1: Lock 1st record

mysql-test/suite/innodb/t/trx_deadlock.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ CREATE TABLE t1(col1 INT PRIMARY KEY, col2 INT) ENGINE=InnoDB;
5757
INSERT INTO t1 VALUES (1, 1), (2, 2);
5858
SELECT * FROM t1;
5959

60+
--echo # Wait for information schema cache for locks to get cleared
61+
let $wait_condition=
62+
SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_LOCKS
63+
WHERE lock_table like "%t1%";
64+
--source include/wait_condition.inc
65+
6066
--connection con1
6167
XA BEGIN 'x1';
6268
--echo # XA Trx-1: Lock 1st record

0 commit comments

Comments
 (0)