summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2018-01-12 16:04:29 +0000
committerSergei Petrunia <psergey@askmonty.org>2018-01-12 16:04:29 +0000
commit2da191791260d5ca3adcb6857404912d52926ee2 (patch)
treeb31d232791c2c4a501f412125026c3ef9846d22e
parentc481fc9ca788a3ac1d61ed6336208c0e2c1cde78 (diff)
downloadmariadb-git-2da191791260d5ca3adcb6857404912d52926ee2.tar.gz
Attempt to eliminate race conditions in rocksdb.information_schema
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/information_schema.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/information_schema.test2
2 files changed, 4 insertions, 0 deletions
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/information_schema.result b/storage/rocksdb/mysql-test/rocksdb/r/information_schema.result
index 717fb0b970c..6850d8dff16 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/information_schema.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/information_schema.result
@@ -1,6 +1,7 @@
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
+SET GLOBAL ROCKSDB_PAUSE_BACKGROUND_WORK=1;
create table t1 (a int) engine=rocksdb;
drop table t1;
select * from INFORMATION_SCHEMA.ROCKSDB_GLOBAL_INFO;
@@ -12,6 +13,7 @@ DDL_DROP_INDEX_ONGOING cf_id:0,index_id:max_index_id
select count(*) from INFORMATION_SCHEMA.ROCKSDB_GLOBAL_INFO;
count(*)
4
+SET GLOBAL ROCKSDB_PAUSE_BACKGROUND_WORK=0;
select VALUE into @keysIn from INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS where CF_NAME = 'default' and LEVEL = 'Sum' and TYPE = 'KeyIn';
CREATE TABLE t1 (i1 INT, i2 INT, PRIMARY KEY (i1)) ENGINE = ROCKSDB;
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3);
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/information_schema.test b/storage/rocksdb/mysql-test/rocksdb/t/information_schema.test
index 8746e589046..2ffc186dd8f 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/information_schema.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/information_schema.test
@@ -13,6 +13,7 @@ DROP TABLE IF EXISTS t3;
# is started on a totally empty datadir, where no MyRocks table has
# ever been created). In that case, there is no MAX_INDEX_ID.
# Create/drop a table so that we do have MAX_INDEX_ID.
+SET GLOBAL ROCKSDB_PAUSE_BACKGROUND_WORK=1;
create table t1 (a int) engine=rocksdb;
drop table t1;
@@ -20,6 +21,7 @@ drop table t1;
--replace_result $max_index_id max_index_id
select * from INFORMATION_SCHEMA.ROCKSDB_GLOBAL_INFO;
select count(*) from INFORMATION_SCHEMA.ROCKSDB_GLOBAL_INFO;
+SET GLOBAL ROCKSDB_PAUSE_BACKGROUND_WORK=0;
select VALUE into @keysIn from INFORMATION_SCHEMA.ROCKSDB_COMPACTION_STATS where CF_NAME = 'default' and LEVEL = 'Sum' and TYPE = 'KeyIn';