diff --git a/mysql-test/suite/rocksdb/write_sync.result b/mysql-test/suite/rocksdb/write_sync.result new file mode 100644 index 000000000000..549851284ff7 --- /dev/null +++ b/mysql-test/suite/rocksdb/write_sync.result @@ -0,0 +1,35 @@ +SET GLOBAL rocksdb_write_disable_wal=false; +SET GLOBAL rocksdb_write_timeout_hint_us=555; +SET GLOBAL rocksdb_write_ignore_missing_column_families=true; +create table aaa (id int primary key, i int) engine rocksdb; +SET GLOBAL rocksdb_write_sync=off; +insert aaa(id, i) values(1,1); +show status like 'rocksdb_wal_synced'; +Variable_name Value +rocksdb_wal_synced 1 +insert aaa(id, i) values(2,1); +show status like 'rocksdb_wal_synced'; +Variable_name Value +rocksdb_wal_synced 1 +insert aaa(id, i) values(3,1); +show status like 'rocksdb_wal_synced'; +Variable_name Value +rocksdb_wal_synced 1 +SET GLOBAL rocksdb_write_sync=on_commit; +insert aaa(id, i) values(4,1); +show status like 'rocksdb_wal_synced'; +Variable_name Value +rocksdb_wal_synced 2 +insert aaa(id, i) values(5,1); +show status like 'rocksdb_wal_synced'; +Variable_name Value +rocksdb_wal_synced 3 +insert aaa(id, i) values(6,1); +show status like 'rocksdb_wal_synced'; +Variable_name Value +rocksdb_wal_synced 4 +drop table aaa; +SET GLOBAL rocksdb_write_sync=off; +SET GLOBAL rocksdb_write_disable_wal=false; +SET GLOBAL rocksdb_write_timeout_hint_us=0; +SET GLOBAL rocksdb_write_ignore_missing_column_families=false; diff --git a/mysql-test/suite/rocksdb/write_sync.test b/mysql-test/suite/rocksdb/write_sync.test new file mode 100644 index 000000000000..a3c0006e0749 --- /dev/null +++ b/mysql-test/suite/rocksdb/write_sync.test @@ -0,0 +1,29 @@ +SET GLOBAL rocksdb_write_disable_wal=false; +SET GLOBAL rocksdb_write_timeout_hint_us=555; +SET GLOBAL rocksdb_write_ignore_missing_column_families=true; + +create table aaa (id int primary key, i int) engine rocksdb; + +SET GLOBAL rocksdb_write_sync=off; +insert aaa(id, i) values(1,1); +show status like 'rocksdb_wal_synced'; +insert aaa(id, i) values(2,1); +show status like 'rocksdb_wal_synced'; +insert aaa(id, i) values(3,1); +show status like 'rocksdb_wal_synced'; + +SET GLOBAL rocksdb_write_sync=on_commit; +insert aaa(id, i) values(4,1); +show status like 'rocksdb_wal_synced'; +insert aaa(id, i) values(5,1); +show status like 'rocksdb_wal_synced'; +insert aaa(id, i) values(6,1); +show status like 'rocksdb_wal_synced'; + +# Cleanup +drop table aaa; +SET GLOBAL rocksdb_write_sync=off; +SET GLOBAL rocksdb_write_disable_wal=false; +SET GLOBAL rocksdb_write_timeout_hint_us=0; +SET GLOBAL rocksdb_write_ignore_missing_column_families=false; +