Skip to content

Commit 67abdb9

Browse files
MDEV-33593 Auto increment deadlock error causes ASSERT in subsequent save point
innodb.autoinc_debug: Correct the test case for predictable deadlock.
1 parent f703e72 commit 67abdb9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ connect con2, localhost, root,,;
119119
START TRANSACTION;
120120
# T2: Wait for (T1) row lock on t2 after acquiring GAP Lock on t1
121121
UPDATE t1 SET col2 = 20 where col1 = 10;
122+
SET DEBUG_SYNC='lock_wait_suspend_thread_enter SIGNAL t2_waiting';
122123
INSERT INTO t2 values(100);
123124
connection default;
125+
SET DEBUG_SYNC='now WAIT_FOR t2_waiting';
124126
# T3: Wait for (T2) II row Lock on t1 after acquiring Auto Increment Lock on t1
125127
SET DEBUG_SYNC='lock_wait_suspend_thread_enter SIGNAL t3_waiting';
126128
INSERT INTO t1(col2) SELECT col2 from t1;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@ INSERT INTO t2 values(100);
110110
START TRANSACTION;
111111
--echo # T2: Wait for (T1) row lock on t2 after acquiring GAP Lock on t1
112112
UPDATE t1 SET col2 = 20 where col1 = 10;
113+
SET DEBUG_SYNC='lock_wait_suspend_thread_enter SIGNAL t2_waiting';
113114
--send INSERT INTO t2 values(100)
114115

115116
--connection default
117+
SET DEBUG_SYNC='now WAIT_FOR t2_waiting';
116118
--echo # T3: Wait for (T2) II row Lock on t1 after acquiring Auto Increment Lock on t1
117119
SET DEBUG_SYNC='lock_wait_suspend_thread_enter SIGNAL t3_waiting';
118120
--send INSERT INTO t1(col2) SELECT col2 from t1

0 commit comments

Comments
 (0)