Commit f89e0778 authored by Sergei Petrunia's avatar Sergei Petrunia

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)
parent 520d2063
......@@ -3,19 +3,33 @@
# Issue #390
#---------------------------
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE=rocksdb;
connect con1, localhost, root,,;
SET auto_increment_increment = 2;
SET auto_increment_offset = 1;
INSERT INTO t1 VALUES(NULL);
connect con2, localhost, root,,;
SET auto_increment_increment = 2;
SET auto_increment_offset = 1;
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go NO_CLEAR_EVENT';
connect con3, localhost, root,,;
connection con1;
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1';
INSERT INTO t1 VALUES(NULL);
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go NO_CLEAR_EVENT';
connection con2;
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go2';
INSERT INTO t1 VALUES(NULL);
connection default;
SET debug_sync='now WAIT_FOR parked1';
SET debug_sync='now WAIT_FOR parked2';
SET debug_sync='now SIGNAL go';
SET debug_sync='now SIGNAL go1';
connection con3;
SET debug_sync='now SIGNAL go2';
connection default;
connection con1;
connection con2;
connection default;
SET debug_sync='RESET';
disconnect con1;
disconnect con2;
SELECT * FROM t1;
a
1
......
......@@ -19,13 +19,15 @@ connect (con2, localhost, root,,);
SET auto_increment_increment = 2;
SET auto_increment_offset = 1;
connect (con3, localhost, root,,);
# Start each thread on an insert that will block waiting for a signal
connection con1;
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go NO_CLEAR_EVENT';
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1';
send INSERT INTO t1 VALUES(NULL);
connection con2;
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go NO_CLEAR_EVENT';
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go2';
send INSERT INTO t1 VALUES(NULL);
# Wait for both threads to be at debug_sync point
......@@ -34,7 +36,11 @@ SET debug_sync='now WAIT_FOR parked1';
SET debug_sync='now WAIT_FOR parked2';
# Signal both threads to continue
SET debug_sync='now SIGNAL go';
send SET debug_sync='now SIGNAL go1';
connection con3;
SET debug_sync='now SIGNAL go2';
connection default;
reap;
connection con1;
reap;
......
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