Skip to content

Commit 555b1b9

Browse files
committed
Make rocksdb dynamic plugin
1 parent 15d101c commit 555b1b9

File tree

7 files changed

+24
-11
lines changed

7 files changed

+24
-11
lines changed

storage/rocksdb/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ ENDIF()
113113

114114
SET(rocksdb_static_libs ROCKSDB_AUX_LIB ${rocksdb_static_libs} ${ZLIB_LIBRARY} "-lrt")
115115

116-
MYSQL_ADD_PLUGIN(rocksdb_se ${ROCKSDB_SOURCES} STORAGE_ENGINE DEFAULT STATIC_ONLY
116+
MYSQL_ADD_PLUGIN(rocksdb_se ${ROCKSDB_SOURCES} STORAGE_ENGINE DEFAULT MODULE_ONLY
117117
LINK_LIBRARIES ${rocksdb_static_libs}
118118
)
119119

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'rocksdb' AND support IN ('YES', 'DEFAULT', 'ENABLED')`)
2+
{
3+
--skip Test requires engine RocksDB.
4+
}
5+
6+
--disable_query_log
7+
# Table statistics can vary depending on when the memtables are flushed, so
8+
# flush them at the beginning of the test to ensure the test runs consistently.
9+
set global rocksdb_force_flush_memtable_now = true;
10+
--enable_query_log
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'rocksdb'` AND support in ('DEFAULT')`)
2+
{
3+
--skip Test requires engine RocksDB as default.
4+
}
5+
6+
--disable_query_log
7+
# Table statistics can vary depending on when the memtables are flushed, so
8+
# flush them at the beginning of the test to ensure the test runs consistently.
9+
set global rocksdb_force_flush_memtable_now = true;
10+
--enable_query_log
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'rocksdb' AND support IN ('DEFAULT')`)
2-
{
3-
--skip Test requires default engine RocksDB
4-
}
5-
61
# MARIAROCKS_NOT_YET: replication doesn't work yet:
72
#if (`select count(*) = 0 from information_schema.tables where engine='rocksdb' and table_name='slave_gtid_info'`)
83
#{
@@ -14,4 +9,3 @@ if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'rocksdb
149
# flush them at the beginning of the test to ensure the test runs consistently.
1510
set global rocksdb_force_flush_memtable_now = true;
1611
--enable_query_log
17-
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
!include include/default_my.cnf
22

33
[server]
4-
rocksdb
54
skip-innodb
65
default-storage-engine=rocksdb
76

87

98
sql-mode=NO_ENGINE_SUBSTITUTION
109
explicit-defaults-for-timestamp=1
11-
rocksdb_lock_wait_timeout=1
12-
rocksdb_strict_collation_check=0
10+
#rocksdb_lock_wait_timeout=1
11+
#rocksdb_strict_collation_check=0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
--ignore-db-dirs=.rocksdb
1+
--ignore-db-dirs=.rocksdb --plugin-load=ha_rocksdb_se
22

0 commit comments

Comments
 (0)