Skip to content

Commit f89e077

Browse files
committed
MariaRocks port: Get rocksdb.autoinc_vars_thread test to work
MariaDB doesn't have NO_CLEAR_EVENT support in DEBUG_SYNC facility. Luckily, the test can be re-written to use two different sync points instead. (I've checked that the modified test fails with fb/mysql-5.6 without the fix for e004fd9f (PR #394)
1 parent 520d206 commit f89e077

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

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

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,33 @@
33
# Issue #390
44
#---------------------------
55
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE=rocksdb;
6+
connect con1, localhost, root,,;
67
SET auto_increment_increment = 2;
78
SET auto_increment_offset = 1;
89
INSERT INTO t1 VALUES(NULL);
10+
connect con2, localhost, root,,;
911
SET auto_increment_increment = 2;
1012
SET auto_increment_offset = 1;
11-
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go NO_CLEAR_EVENT';
13+
connect con3, localhost, root,,;
14+
connection con1;
15+
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1';
1216
INSERT INTO t1 VALUES(NULL);
13-
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go NO_CLEAR_EVENT';
17+
connection con2;
18+
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go2';
1419
INSERT INTO t1 VALUES(NULL);
20+
connection default;
1521
SET debug_sync='now WAIT_FOR parked1';
1622
SET debug_sync='now WAIT_FOR parked2';
17-
SET debug_sync='now SIGNAL go';
23+
SET debug_sync='now SIGNAL go1';
24+
connection con3;
25+
SET debug_sync='now SIGNAL go2';
26+
connection default;
27+
connection con1;
28+
connection con2;
29+
connection default;
1830
SET debug_sync='RESET';
31+
disconnect con1;
32+
disconnect con2;
1933
SELECT * FROM t1;
2034
a
2135
1

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ connect (con2, localhost, root,,);
1919
SET auto_increment_increment = 2;
2020
SET auto_increment_offset = 1;
2121

22+
connect (con3, localhost, root,,);
23+
2224
# Start each thread on an insert that will block waiting for a signal
2325
connection con1;
24-
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go NO_CLEAR_EVENT';
26+
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1';
2527
send INSERT INTO t1 VALUES(NULL);
2628

2729
connection con2;
28-
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go NO_CLEAR_EVENT';
30+
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go2';
2931
send INSERT INTO t1 VALUES(NULL);
3032

3133
# Wait for both threads to be at debug_sync point
@@ -34,7 +36,11 @@ SET debug_sync='now WAIT_FOR parked1';
3436
SET debug_sync='now WAIT_FOR parked2';
3537

3638
# Signal both threads to continue
37-
SET debug_sync='now SIGNAL go';
39+
send SET debug_sync='now SIGNAL go1';
40+
connection con3;
41+
SET debug_sync='now SIGNAL go2';
42+
connection default;
43+
reap;
3844

3945
connection con1;
4046
reap;

0 commit comments

Comments
 (0)