Skip to content

Commit ba0d8ae

Browse files
committed
Fix rocksdb.unique_check: do not have two threads waiting on the same name
1 parent d644402 commit ba0d8ae

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

storage/rocksdb/mysql-test/rocksdb/r/unique_check.result

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ id id2 value
6666
2 1 2
6767
truncate table t2;
6868
connection con1;
69-
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go';
69+
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go1';
7070
insert into t1 values (1,1);
7171
connection default;
7272
set debug_sync='now WAIT_FOR parked1';
7373
connection con2;
74-
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go';
74+
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go2';
7575
insert into t2 values (1,1,1);
7676
connection default;
7777
set debug_sync='now WAIT_FOR parked2';
@@ -82,7 +82,8 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
8282
insert into t2 values (2,1,2);
8383
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
8484
connection default;
85-
set debug_sync='now SIGNAL go';
85+
set debug_sync='now SIGNAL go1';
86+
set debug_sync='now SIGNAL go2';
8687
connection con1;
8788
connection con2;
8889
connection default;

storage/rocksdb/mysql-test/rocksdb/t/unique_check.test

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ truncate table t2;
102102

103103
# 4) simulating T1 GetForUpdate() -> T2 GetForUpdate(). T2 should fail with lock wait timeout.
104104
connection con1;
105-
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go';
105+
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go1';
106106
send insert into t1 values (1,1);
107107

108108
connection default;
109109
set debug_sync='now WAIT_FOR parked1';
110110

111111
connection con2;
112-
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go';
112+
set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go2';
113113
send insert into t2 values (1,1,1);
114114

115115
connection default;
@@ -123,7 +123,8 @@ insert into t1 values (1,2);
123123
insert into t2 values (2,1,2);
124124

125125
connection default;
126-
set debug_sync='now SIGNAL go';
126+
set debug_sync='now SIGNAL go1';
127+
set debug_sync='now SIGNAL go2';
127128

128129
connection con1;
129130
reap;

0 commit comments

Comments
 (0)