diff --git a/mysql-test/suite/rocksdb/t/ttl_secondary_read_filtering_multiple_index.test b/mysql-test/suite/rocksdb/t/ttl_secondary_read_filtering_multiple_index.test new file mode 100644 index 0000000000000000000000000000000000000000..031aa7771763fd666beca4dd19e06016df974da2 --- /dev/null +++ b/mysql-test/suite/rocksdb/t/ttl_secondary_read_filtering_multiple_index.test @@ -0,0 +1,91 @@ +--source include/have_debug.inc +--source include/have_rocksdb.inc + +set @orig_rocksdb_debug_ttl_rec_ts = @@global.rocksdb_debug_ttl_rec_ts; + +# Multiple indexes, trigger compaction on sk and check consistency +CREATE TABLE t1 ( + a int NOT NULL, + b int NOT NULL, + c int NOT NULL, + PRIMARY KEY (a), + KEY kb (b) COMMENT 'cfname=kb', + KEY kc (c) COMMENT 'cfname=kc' +) ENGINE=ROCKSDB +COMMENT='ttl_duration=1'; + +set global rocksdb_debug_ttl_rec_ts = -100; +INSERT INTO t1 values (1, 1, 1); +INSERT INTO t1 values (2, 2, 2); +set global rocksdb_debug_ttl_rec_ts = 100; +INSERT INTO t1 values (3, 3, 3); +set global rocksdb_debug_ttl_rec_ts = 0; + +set global rocksdb_force_flush_memtable_now=1; +set global rocksdb_compact_cf='kb'; + +# Results should be consistent +SELECT * FROM t1 FORCE INDEX (PRIMARY); +SELECT * FROM t1 FORCE INDEX (kb); +SELECT * FROM t1 FORCE INDEX (kc); + +DROP TABLE t1; + +# Trigger compaction on pk and check consistency +CREATE TABLE t1 ( + a int NOT NULL, + b int NOT NULL, + c int NOT NULL, + PRIMARY KEY (a), + KEY kb (b) COMMENT 'cfname=kb', + KEY kc (c) COMMENT 'cfname=kc' +) ENGINE=ROCKSDB +COMMENT='ttl_duration=1'; + +set global rocksdb_debug_ttl_rec_ts = -100; +INSERT INTO t1 values (1, 1, 1); +INSERT INTO t1 values (2, 2, 2); +set global rocksdb_debug_ttl_rec_ts = 100; +INSERT INTO t1 values (3, 3, 3); +set global rocksdb_debug_ttl_rec_ts = 0; + +set global rocksdb_force_flush_memtable_now=1; +set global rocksdb_compact_cf='default'; + +# Results should be consistent +SELECT * FROM t1 FORCE INDEX (PRIMARY); +SELECT * FROM t1 FORCE INDEX (kb); +SELECT * FROM t1 FORCE INDEX (kc); + +DROP TABLE t1; + +# Trigger compaction on pk and sk and check consistency +CREATE TABLE t1 ( + a int NOT NULL, + b int NOT NULL, + c int NOT NULL, + PRIMARY KEY (a), + KEY kb (b) COMMENT 'cfname=kb', + KEY kc (c) COMMENT 'cfname=kc' +) ENGINE=ROCKSDB +COMMENT='ttl_duration=1'; + +set global rocksdb_debug_ttl_rec_ts = -100; +INSERT INTO t1 values (1, 1, 1); +INSERT INTO t1 values (2, 2, 2); +set global rocksdb_debug_ttl_rec_ts = 100; +INSERT INTO t1 values (3, 3, 3); +set global rocksdb_debug_ttl_rec_ts = 0; + +set global rocksdb_force_flush_memtable_now=1; +set global rocksdb_compact_cf='default'; +set global rocksdb_compact_cf='kb'; + +# Results should be consistent +SELECT * FROM t1 FORCE INDEX (PRIMARY); +SELECT * FROM t1 FORCE INDEX (kb); +SELECT * FROM t1 FORCE INDEX (kc); + +DROP TABLE t1; + +set @@global.rocksdb_debug_ttl_rec_ts = @orig_rocksdb_debug_ttl_rec_ts ; diff --git a/mysql-test/suite/rocksdb/t/ttl_secondary_with_partitions-master.opt b/mysql-test/suite/rocksdb/t/ttl_secondary_with_partitions-master.opt new file mode 100644 index 0000000000000000000000000000000000000000..e5c934d97ea884f807d045700fa47529ccffda7d --- /dev/null +++ b/mysql-test/suite/rocksdb/t/ttl_secondary_with_partitions-master.opt @@ -0,0 +1 @@ +--loose-rocksdb_enable_ttl_read_filtering=0 diff --git a/mysql-test/suite/rocksdb_rpl/t/rpl_rocksdb_row_crash_safe-master.opt b/mysql-test/suite/rocksdb_rpl/t/rpl_rocksdb_row_crash_safe-master.opt new file mode 100644 index 0000000000000000000000000000000000000000..e980c2de7ff6653005b34a925d58cc07d05bd4ac --- /dev/null +++ b/mysql-test/suite/rocksdb_rpl/t/rpl_rocksdb_row_crash_safe-master.opt @@ -0,0 +1 @@ +--transaction_isolation=READ-COMMITTED diff --git a/mysql-test/suite/rocksdb_rpl/t/rpl_rocksdb_row_crash_safe-slave.opt b/mysql-test/suite/rocksdb_rpl/t/rpl_rocksdb_row_crash_safe-slave.opt new file mode 100644 index 0000000000000000000000000000000000000000..79e05d98915d2caec40cf94fc422c2b9c147af3b --- /dev/null +++ b/mysql-test/suite/rocksdb_rpl/t/rpl_rocksdb_row_crash_safe-slave.opt @@ -0,0 +1 @@ +--skip-slave-start --relay-log-recovery=1 --transaction_isolation=READ-COMMITTED