MDEV-33593 Auto increment deadlock error causes ASSERT in subsequent save point

innodb.autoinc_debug: Correct the test case for predictable deadlock.
parent f703e72b
...@@ -119,8 +119,10 @@ connect con2, localhost, root,,; ...@@ -119,8 +119,10 @@ connect con2, localhost, root,,;
START TRANSACTION; START TRANSACTION;
# T2: Wait for (T1) row lock on t2 after acquiring GAP Lock on t1 # T2: Wait for (T1) row lock on t2 after acquiring GAP Lock on t1
UPDATE t1 SET col2 = 20 where col1 = 10; UPDATE t1 SET col2 = 20 where col1 = 10;
SET DEBUG_SYNC='lock_wait_suspend_thread_enter SIGNAL t2_waiting';
INSERT INTO t2 values(100); INSERT INTO t2 values(100);
connection default; connection default;
SET DEBUG_SYNC='now WAIT_FOR t2_waiting';
# T3: Wait for (T2) II row Lock on t1 after acquiring Auto Increment Lock on t1 # T3: Wait for (T2) II row Lock on t1 after acquiring Auto Increment Lock on t1
SET DEBUG_SYNC='lock_wait_suspend_thread_enter SIGNAL t3_waiting'; SET DEBUG_SYNC='lock_wait_suspend_thread_enter SIGNAL t3_waiting';
INSERT INTO t1(col2) SELECT col2 from t1; INSERT INTO t1(col2) SELECT col2 from t1;
......
...@@ -110,9 +110,11 @@ INSERT INTO t2 values(100); ...@@ -110,9 +110,11 @@ INSERT INTO t2 values(100);
START TRANSACTION; START TRANSACTION;
--echo # T2: Wait for (T1) row lock on t2 after acquiring GAP Lock on t1 --echo # T2: Wait for (T1) row lock on t2 after acquiring GAP Lock on t1
UPDATE t1 SET col2 = 20 where col1 = 10; UPDATE t1 SET col2 = 20 where col1 = 10;
SET DEBUG_SYNC='lock_wait_suspend_thread_enter SIGNAL t2_waiting';
--send INSERT INTO t2 values(100) --send INSERT INTO t2 values(100)
--connection default --connection default
SET DEBUG_SYNC='now WAIT_FOR t2_waiting';
--echo # T3: Wait for (T2) II row Lock on t1 after acquiring Auto Increment Lock on t1 --echo # T3: Wait for (T2) II row Lock on t1 after acquiring Auto Increment Lock on t1
SET DEBUG_SYNC='lock_wait_suspend_thread_enter SIGNAL t3_waiting'; SET DEBUG_SYNC='lock_wait_suspend_thread_enter SIGNAL t3_waiting';
--send INSERT INTO t1(col2) SELECT col2 from t1 --send INSERT INTO t1(col2) SELECT col2 from t1
......
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