1--source include/have_rocksdb.inc 2 3--disable_warnings 4DROP TABLE IF EXISTS t1; 5DROP TABLE IF EXISTS t2; 6DROP TABLE IF EXISTS t3; 7DROP TABLE IF EXISTS t4; 8DROP TABLE IF EXISTS t5; 9--enable_warnings 10 11# Start from clean slate 12#--source include/restart_mysqld.inc 13 14CREATE TABLE t1 ( 15 a int not null, 16 b int not null, 17 primary key (a,b) comment 'cf1', 18 key (b) comment 'rev:cf2' 19) ENGINE=RocksDB; 20 21CREATE TABLE t2 ( 22 a int not null, 23 b int not null, 24 primary key (a,b) comment 'cf1', 25 key (b) comment 'rev:cf2' 26) ENGINE=RocksDB; 27 28CREATE TABLE t3 ( 29 a int not null, 30 b int not null, 31 primary key (a,b) comment 'cf1', 32 key (b) comment 'rev:cf2' 33) ENGINE=RocksDB; 34 35CREATE TABLE t4 ( 36 a int not null, 37 b int not null, 38 primary key (a,b) comment 'cf1', 39 key (b) comment 'rev:cf2' 40) ENGINE=RocksDB; 41 42# Populate tables 43let $max = 1000; 44let $table = t1; 45--source drop_table_repopulate_table.inc 46let $table = t2; 47--source drop_table_repopulate_table.inc 48let $table = t3; 49--source drop_table_repopulate_table.inc 50let $table = t4; 51--source drop_table_repopulate_table.inc 52 53# Make sure new table gets unique indices 54CREATE TABLE t5 ( 55 a int not null, 56 b int not null, 57 primary key (a,b) comment 'cf1', 58 key (b) comment 'rev:cf2' 59) ENGINE=RocksDB; 60 61let $max = 1000; 62let $table = t5; 63--source drop_table_repopulate_table.inc 64 65# Create checkpoint without trailing '/' 66let $checkpoint = $MYSQL_TMP_DIR/checkpoint; 67let $succeeds = 1; 68--source set_checkpoint.inc 69 70# Create checkpoint with a trailing '/' 71let $checkpoint = $MYSQL_TMP_DIR/checkpoint/; 72let $succeeds = 1; 73--source set_checkpoint.inc 74 75# Set checkpoint dir as empty string, which fails 76let $checkpoint = ; 77let $succeeds = 0; 78--source set_checkpoint.inc 79 80# Set checkpoint as a directory that does not exist, which fails 81let $checkpoint = /does/not/exist; 82let $succeeds = 0; 83--source set_checkpoint.inc 84 85# Set checkpoint as a directory that already exists, which fails 86let $checkpoint = $MYSQL_TMP_DIR/already-existing-directory; 87--mkdir $checkpoint 88let $succeeds = 0; 89--source set_checkpoint.inc 90rmdir $checkpoint; 91 92--disable_result_log 93truncate table t1; 94optimize table t1; 95truncate table t2; 96optimize table t2; 97truncate table t3; 98optimize table t3; 99truncate table t4; 100optimize table t4; 101truncate table t5; 102optimize table t5; 103drop table if exists t1; 104drop table if exists t2; 105drop table if exists t3; 106drop table if exists t4; 107drop table if exists t5; 108