summaryrefslogtreecommitdiff
path: root/storage/rocksdb
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2019-07-15 00:50:46 +0300
committerSergei Petrunia <psergey@askmonty.org>2019-07-15 00:50:46 +0300
commitb3bd51c9929509d23648c11fbe87b5a4760e13e4 (patch)
tree07da441b098708ffe3043c6d9f7bebc677210d6c /storage/rocksdb
parent9ccbe8d581e89caaabb21996baeddf7f645ffd74 (diff)
downloadmariadb-git-b3bd51c9929509d23648c11fbe87b5a4760e13e4.tar.gz
Fix rocksdb.autoinc_vars_thread test
Diffstat (limited to 'storage/rocksdb')
-rw-r--r--storage/rocksdb/ha_rocksdb.cc1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result5
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test10
3 files changed, 12 insertions, 4 deletions
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index ccafdc043dd..4f256b10abc 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -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.
*/
DEBUG_SYNC(ha_thd(), "rocksdb.autoinc_vars");
+ DEBUG_SYNC(ha_thd(), "rocksdb.autoinc_vars2");
if (off > inc) {
off = 1;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result b/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result
index db64778d345..9331b4e22a5 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result
@@ -12,17 +12,18 @@ SET auto_increment_increment = 2;
SET auto_increment_offset = 1;
connect con3, localhost, root,,;
connection con1;
+SET debug_sync='rocksdb.autoinc_vars2 SIGNAL go2';
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1';
INSERT INTO t1 VALUES(NULL);
+connection default;
+SET debug_sync='now WAIT_FOR parked1';
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 go1';
connection con3;
-SET debug_sync='now SIGNAL go2';
connection default;
connection con1;
connection con2;
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test b/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test
index 78521fbc9ef..5a40d28e1c9 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test
@@ -23,22 +23,28 @@ connect (con3, localhost, root,,);
# Start each thread on an insert that will block waiting for a signal
connection con1;
+SET debug_sync='rocksdb.autoinc_vars2 SIGNAL go2';
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1';
send INSERT INTO t1 VALUES(NULL);
+connection default;
+SET debug_sync='now WAIT_FOR parked1';
+
connection con2;
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
connection default;
-SET debug_sync='now WAIT_FOR parked1';
SET debug_sync='now WAIT_FOR parked2';
+
# 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';
connection con3;
-SET debug_sync='now SIGNAL go2';
+# MariaDB: do nothing here
+
connection default;
reap;