1--source include/have_rocksdb.inc 2 3let $ddir = $MYSQLTEST_VARDIR/.rocksdb_datadir.test.install.db; 4let $rdb_ddir = $MYSQLTEST_VARDIR/.rocksdb_datadir.test; 5let $sql_file = $MYSQLTEST_VARDIR/rocksdb_datadir.sql; 6 7--write_file $sql_file 8DROP DATABASE IF EXISTS mysqltest; 9CREATE DATABASE mysqltest; 10USE mysqltest; 11CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=rocksdb; 12INSERT INTO t1 VALUES(42); 13SET GLOBAL rocksdb_force_flush_memtable_now = 1; 14SELECT sleep(1); 15DROP TABLE t1; 16EOF 17 18# Must ensure this directory exists before launching mysqld 19mkdir $ddir; 20 21# Launch mysqld with non-standard rocksdb_datadir 22exec $MYSQLD_BOOTSTRAP_CMD --plugin-load=rocksdb=ha_rocksdb.so --datadir=$ddir --rocksdb_datadir=$rdb_ddir < $sql_file; 23 24--echo Check for the number of MANIFEST files 25exec ls $rdb_ddir/MANIFEST-0000* | wc -l; 26 27# Clean up 28remove_files_wildcard $ddir *; 29exec rm -rf $ddir; 30remove_files_wildcard $rdb_ddir *; 31exec rm -rf $rdb_ddir; 32remove_file $sql_file; 33