Commit b3bd51c9 authored by Sergei Petrunia's avatar Sergei Petrunia

Fix rocksdb.autoinc_vars_thread test

parent 9ccbe8d5
...@@ -12178,6 +12178,7 @@ void ha_rocksdb::get_auto_increment(ulonglong off, ulonglong inc, ...@@ -12178,6 +12178,7 @@ void ha_rocksdb::get_auto_increment(ulonglong off, ulonglong inc,
an actual reserve of some values might be a better solution. an actual reserve of some values might be a better solution.
*/ */
DEBUG_SYNC(ha_thd(), "rocksdb.autoinc_vars"); DEBUG_SYNC(ha_thd(), "rocksdb.autoinc_vars");
DEBUG_SYNC(ha_thd(), "rocksdb.autoinc_vars2");
if (off > inc) { if (off > inc) {
off = 1; off = 1;
......
...@@ -12,17 +12,18 @@ SET auto_increment_increment = 2; ...@@ -12,17 +12,18 @@ SET auto_increment_increment = 2;
SET auto_increment_offset = 1; SET auto_increment_offset = 1;
connect con3, localhost, root,,; connect con3, localhost, root,,;
connection con1; connection con1;
SET debug_sync='rocksdb.autoinc_vars2 SIGNAL go2';
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1'; SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1';
INSERT INTO t1 VALUES(NULL); INSERT INTO t1 VALUES(NULL);
connection default;
SET debug_sync='now WAIT_FOR parked1';
connection con2; connection con2;
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go2'; SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go2';
INSERT INTO t1 VALUES(NULL); INSERT INTO t1 VALUES(NULL);
connection default; connection default;
SET debug_sync='now WAIT_FOR parked1';
SET debug_sync='now WAIT_FOR parked2'; SET debug_sync='now WAIT_FOR parked2';
SET debug_sync='now SIGNAL go1'; SET debug_sync='now SIGNAL go1';
connection con3; connection con3;
SET debug_sync='now SIGNAL go2';
connection default; connection default;
connection con1; connection con1;
connection con2; connection con2;
......
...@@ -23,22 +23,28 @@ connect (con3, localhost, root,,); ...@@ -23,22 +23,28 @@ connect (con3, localhost, root,,);
# Start each thread on an insert that will block waiting for a signal # Start each thread on an insert that will block waiting for a signal
connection con1; connection con1;
SET debug_sync='rocksdb.autoinc_vars2 SIGNAL go2';
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1'; SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1';
send INSERT INTO t1 VALUES(NULL); send INSERT INTO t1 VALUES(NULL);
connection default;
SET debug_sync='now WAIT_FOR parked1';
connection con2; connection con2;
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go2'; SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go2';
send INSERT INTO t1 VALUES(NULL); send INSERT INTO t1 VALUES(NULL);
# Wait for both threads to be at debug_sync point # Wait for both threads to be at debug_sync point
connection default; connection default;
SET debug_sync='now WAIT_FOR parked1';
SET debug_sync='now WAIT_FOR parked2'; SET debug_sync='now WAIT_FOR parked2';
# Signal both threads to continue # Signal both threads to continue
# (In MariaDB, we signal one of them which continues and signals the other)
send SET debug_sync='now SIGNAL go1'; send SET debug_sync='now SIGNAL go1';
connection con3; connection con3;
SET debug_sync='now SIGNAL go2'; # MariaDB: do nothing here
connection default; connection default;
reap; 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