summaryrefslogtreecommitdiffstats
path: root/storage/rocksdb/mysql-test/storage_engine
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /storage/rocksdb/mysql-test/storage_engine
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/rocksdb/mysql-test/storage_engine')
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/cache_index.rdiff71
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/checksum_table_live.rdiff13
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/cleanup_engine.inc25
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/define_engine.inc45
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/disabled.def27
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/index.rdiff60
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/index_type_btree.rdiff60
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/index_type_hash.rdiff60
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/mask_engine.inc15
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/misc.rdiff34
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/parts/checksum_table.rdiff13
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/parts/create_table.rdiff20
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/parts/disabled.def3
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/parts/suite.opt1
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/show_engine.rdiff15
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/show_table_status.rdiff20
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/suite.opt1
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/tbl_opt_insert_method.rdiff11
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/tbl_opt_union.rdiff16
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/tbl_temporary.rdiff24
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/truncate_table.rdiff24
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/trx/delete.rdiff10
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/trx/disabled.def4
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/trx/insert.rdiff24
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/trx/level_read_committed.rdiff10
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/trx/level_repeatable_read.rdiff35
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/trx/suite.opt1
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/trx/update.rdiff38
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/type_binary_indexes.rdiff11
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/type_bit_indexes.rdiff20
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/type_enum_indexes.rdiff11
-rw-r--r--storage/rocksdb/mysql-test/storage_engine/type_set_indexes.rdiff20
32 files changed, 742 insertions, 0 deletions
diff --git a/storage/rocksdb/mysql-test/storage_engine/cache_index.rdiff b/storage/rocksdb/mysql-test/storage_engine/cache_index.rdiff
new file mode 100644
index 00000000..76e7705e
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/cache_index.rdiff
@@ -0,0 +1,71 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/cache_index.result 2017-06-22 00:33:46.419995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/cache_index.reject 2017-06-22 01:11:22.479981459 +0300
+@@ -12,31 +12,31 @@
+ SET GLOBAL <CACHE_NAME>.key_buffer_size=128*1024;
+ CACHE INDEX t1 INDEX (a), t2 IN <CACHE_NAME>;
+ Table Op Msg_type Msg_text
+-test.t1 assign_to_keycache status OK
+-test.t2 assign_to_keycache status OK
++test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache
++test.t2 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache
+ LOAD INDEX INTO CACHE t1, t2;
+ Table Op Msg_type Msg_text
+-test.t1 preload_keys status OK
+-test.t2 preload_keys status OK
++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys
++test.t2 preload_keys note The storage engine for the table doesn't support preload_keys
+ INSERT INTO t1 (a,b) VALUES (3,'c'),(4,'d');
+ SET GLOBAL <CACHE_NAME>.key_buffer_size=8*1024;
+ LOAD INDEX INTO CACHE t1, t2 IGNORE LEAVES;
+ Table Op Msg_type Msg_text
+-test.t1 preload_keys status OK
+-test.t2 preload_keys status OK
++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys
++test.t2 preload_keys note The storage engine for the table doesn't support preload_keys
+ SET GLOBAL <CACHE_NAME>.key_cache_age_threshold = 100, <CACHE_NAME>.key_cache_block_size = 512, <CACHE_NAME>.key_cache_division_limit = 1, <CACHE_NAME>.key_cache_segments=2;
+ INSERT INTO t1 (a,b) VALUES (5,'e'),(6,'f');
+ LOAD INDEX INTO CACHE t1;
+ Table Op Msg_type Msg_text
+-test.t1 preload_keys status OK
++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys
+ SET GLOBAL new_<CACHE_NAME>.key_buffer_size=128*1024;
+ CACHE INDEX t1 IN new_<CACHE_NAME>;
+ Table Op Msg_type Msg_text
+-test.t1 assign_to_keycache status OK
++test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache
+ INSERT INTO t1 (a,b) VALUES (7,'g'),(8,'h');
+ LOAD INDEX INTO CACHE t1 IGNORE LEAVES;
+ Table Op Msg_type Msg_text
+-test.t1 preload_keys status OK
++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys
+ INSERT INTO t1 (a,b) VALUES (9,'i');
+ DROP TABLE t2;
+ DROP TABLE t1;
+@@ -47,11 +47,11 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ CACHE INDEX t1 IN <CACHE_NAME>;
+ Table Op Msg_type Msg_text
+-test.t1 assign_to_keycache status OK
++test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache
+ INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
+ LOAD INDEX INTO CACHE t1;
+ Table Op Msg_type Msg_text
+-test.t1 preload_keys status OK
++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+ b <CHAR_COLUMN>,
+@@ -59,11 +59,11 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ CACHE INDEX t1 IN <CACHE_NAME>;
+ Table Op Msg_type Msg_text
+-test.t1 assign_to_keycache status OK
++test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache
+ INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
+ LOAD INDEX INTO CACHE t1;
+ Table Op Msg_type Msg_text
+-test.t1 preload_keys status OK
++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys
+ DROP TABLE t1;
+ SET GLOBAL <CACHE_NAME>.key_buffer_size=0;
+ SET GLOBAL new_<CACHE_NAME>.key_buffer_size=0;
diff --git a/storage/rocksdb/mysql-test/storage_engine/checksum_table_live.rdiff b/storage/rocksdb/mysql-test/storage_engine/checksum_table_live.rdiff
new file mode 100644
index 00000000..094136ee
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/checksum_table_live.rdiff
@@ -0,0 +1,13 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/checksum_table_live.result 2017-06-22 00:33:46.419995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/checksum_table_live.reject 2017-06-22 01:12:38.695980980 +0300
+@@ -11,8 +11,8 @@
+ test.t1 4272806499
+ CHECKSUM TABLE t1, t2 QUICK;
+ Table Checksum
+-test.t1 4272806499
+-test.t2 0
++test.t1 NULL
++test.t2 NULL
+ CHECKSUM TABLE t1, t2 EXTENDED;
+ Table Checksum
+ test.t1 4272806499
diff --git a/storage/rocksdb/mysql-test/storage_engine/cleanup_engine.inc b/storage/rocksdb/mysql-test/storage_engine/cleanup_engine.inc
new file mode 100644
index 00000000..e6fe915e
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/cleanup_engine.inc
@@ -0,0 +1,25 @@
+###########################################
+#
+# This is a stub of the include file cleanup_engine.inc which
+# should be placed in storage/<engine>/mysql-test/storage_engine folder.
+#
+################################
+#
+# Here you can add whatever is needed to cleanup
+# in case your define_engine.inc created any artefacts,
+# e.g. an additional schema and/or tables.
+
+--let $datadir= `SELECT @@datadir`
+
+--error 0,1
+--file_exists $datadir/\#rocksdb/*
+if (!$mysql_errno)
+{
+ --enable_reconnect
+ --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --shutdown_server
+ --source include/wait_until_disconnected.inc
+ --rmdir $datadir/\#rocksdb
+ --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --source include/wait_until_connected_again.inc
+}
diff --git a/storage/rocksdb/mysql-test/storage_engine/define_engine.inc b/storage/rocksdb/mysql-test/storage_engine/define_engine.inc
new file mode 100644
index 00000000..1c77a6b6
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/define_engine.inc
@@ -0,0 +1,45 @@
+###########################################
+#
+# This is a template of the include file define_engine.inc which
+# should be placed in storage/<engine>/mysql-test/storage_engine folder.
+#
+################################
+#
+# The name of the engine under test must be defined in $ENGINE variable.
+# You can set it either here (uncomment and edit) or in your environment.
+#
+let $ENGINE = RocksDB;
+#
+################################
+#
+# The following three variables define specific options for columns and tables.
+# Normally there should be none needed, but for some engines it can be different.
+# If the engine requires specific column option for all or indexed columns,
+# set them inside the comment, e.g. /*!NOT NULL*/.
+# Do the same for table options if needed, e.g. /*!INSERT_METHOD=LAST*/
+
+let $default_col_opts = /*!*/;
+let $default_col_indexed_opts = /*!*/;
+let $default_tbl_opts = /*!*/;
+
+# INDEX, UNIQUE INDEX, PRIMARY KEY, special index type - choose the fist that the engine allows,
+# or set it to /*!*/ if none is supported
+
+let $default_index = /*!INDEX*/;
+
+# If the engine does not support the following types, replace them with the closest possible
+
+let $default_int_type = INT(11);
+let $default_char_type = CHAR(8);
+
+################################
+
+--disable_query_log
+--disable_result_log
+
+# Here you can place your custom MTR code which needs to be executed before each test,
+# e.g. creation of an additional schema or table, etc.
+# The cleanup part should be defined in cleanup_engine.inc
+
+--enable_query_log
+--enable_result_log
diff --git a/storage/rocksdb/mysql-test/storage_engine/disabled.def b/storage/rocksdb/mysql-test/storage_engine/disabled.def
new file mode 100644
index 00000000..7ed4fac6
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/disabled.def
@@ -0,0 +1,27 @@
+alter_tablespace : Not supported
+autoinc_secondary : Not supported
+create_table : MDEV-12914 - Engine for temporary tables which are implicitly created as RocksDB is substituted silently
+delete_low_prio : Not supported
+foreign_keys : Not supported
+fulltext_search : Not supported
+handler : Not supported
+index_enable_disable : Not supported
+insert_delayed : Not supported
+insert_high_prio : Not supported
+insert_low_prio : Not supported
+lock : MDEV-13148 - LOCK TABLE on RocksDB table fails with a bogus error message
+lock_concurrent : MDEV-13148 - LOCK TABLE on RocksDB table fails with a bogus error message
+optimize_table : MDEV-13148 - LOCK TABLE on RocksDB table fails with a bogus error message
+repair_table : MDEV-13148 - LOCK TABLE on RocksDB table fails with a bogus error message
+select_high_prio : Not supported
+show_engine : SHOW ENGINE produces different number of lines depending on previous tests
+show_table_status : MDEV-13152 - Indeterministic row number in SHOW TABLE STATUS on RocksDB table
+tbl_opt_data_dir : Not supported
+tbl_opt_index_dir : Not supported
+type_binary_indexes : MDEV-16387 - Wrong execution plan
+type_spatial : Not supported
+type_spatial_indexes : Not supported
+update_low_prio : Not supported
+update_ignore : MDEV-13151 - Indeterministic results of multi-table update on RocksDB tables
+update_multi : MDEV-13151 - Indeterministic results of multi-table update on RocksDB tables
+vcol : Not supported
diff --git a/storage/rocksdb/mysql-test/storage_engine/index.rdiff b/storage/rocksdb/mysql-test/storage_engine/index.rdiff
new file mode 100644
index 00000000..76d6c6dd
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/index.rdiff
@@ -0,0 +1,60 @@
+--- suite/storage_engine/index.result 2017-03-12 04:57:07.169911845 +0200
++++ suite/storage_engine/index.reject 2017-08-14 22:41:06.548555663 +0300
+@@ -4,7 +4,7 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 1 a 1 a # # NULL NULL # BTREE
++t1 1 a 1 a # # NULL NULL # LSMTREE
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+ b <CHAR_COLUMN>,
+@@ -12,8 +12,8 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 1 a_b 1 a # # NULL NULL # BTREE a_b index
+-t1 1 a_b 2 b # # NULL NULL # BTREE a_b index
++t1 1 a_b 1 a # # NULL NULL # LSMTREE a_b index
++t1 1 a_b 2 b # # NULL NULL # LSMTREE a_b index
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+ b <CHAR_COLUMN>,
+@@ -22,8 +22,8 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 1 a 1 a # # NULL NULL # BTREE
+-t1 1 b 1 b # # NULL NULL # BTREE
++t1 1 a 1 a # # NULL NULL # LSMTREE
++t1 1 b 1 b # # NULL NULL # LSMTREE
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+ b <CHAR_COLUMN>,
+@@ -31,7 +31,7 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 0 a 1 a # # NULL NULL # BTREE
++t1 0 a 1 a # # NULL NULL # LSMTREE
+ INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
+ INSERT INTO t1 (a,b) VALUES (1,'c');
+ ERROR 23000: Duplicate entry '1' for key 'a'
+@@ -43,7 +43,7 @@
+ ALTER TABLE t1 ADD <CUSTOM_INDEX> (a) COMMENT 'simple index on a';
+ SHOW INDEX FROM t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 1 a 1 a # # NULL NULL # BTREE simple index on a
++t1 1 a 1 a # # NULL NULL # LSMTREE simple index on a
+ ALTER TABLE t1 DROP KEY a;
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+@@ -52,7 +52,7 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 0 a 1 a # # NULL NULL # BTREE
++t1 0 a 1 a # # NULL NULL # LSMTREE
+ INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
+ INSERT INTO t1 (a,b) VALUES (1,'c');
+ ERROR 23000: Duplicate entry '1' for key 'a'
diff --git a/storage/rocksdb/mysql-test/storage_engine/index_type_btree.rdiff b/storage/rocksdb/mysql-test/storage_engine/index_type_btree.rdiff
new file mode 100644
index 00000000..5fcffbea
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/index_type_btree.rdiff
@@ -0,0 +1,60 @@
+--- suite/storage_engine/index_type_btree.result 2017-03-12 04:57:07.169911845 +0200
++++ suite/storage_engine/index_type_btree.reject 2017-08-14 22:50:47.264555216 +0300
+@@ -4,7 +4,7 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 1 a 1 a # # NULL NULL # BTREE
++t1 1 a 1 a # # NULL NULL # LSMTREE
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+ b <CHAR_COLUMN>,
+@@ -12,8 +12,8 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 1 a_b 1 a # # NULL NULL # BTREE a_b index
+-t1 1 a_b 2 b # # NULL NULL # BTREE a_b index
++t1 1 a_b 1 a # # NULL NULL # LSMTREE a_b index
++t1 1 a_b 2 b # # NULL NULL # LSMTREE a_b index
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+ b <CHAR_COLUMN>,
+@@ -22,8 +22,8 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 1 a 1 a # # NULL NULL # BTREE
+-t1 1 b 1 b # # NULL NULL # BTREE
++t1 1 a 1 a # # NULL NULL # LSMTREE
++t1 1 b 1 b # # NULL NULL # LSMTREE
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+ b <CHAR_COLUMN>,
+@@ -31,7 +31,7 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 0 a 1 a # # NULL NULL # BTREE
++t1 0 a 1 a # # NULL NULL # LSMTREE
+ INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
+ INSERT INTO t1 (a,b) VALUES (1,'c');
+ ERROR 23000: Duplicate entry '1' for key 'a'
+@@ -43,7 +43,7 @@
+ ALTER TABLE t1 ADD <CUSTOM_INDEX> (a) USING BTREE COMMENT 'simple index on a';
+ SHOW INDEX FROM t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 1 a 1 a # # NULL NULL # BTREE simple index on a
++t1 1 a 1 a # # NULL NULL # LSMTREE simple index on a
+ ALTER TABLE t1 DROP KEY a;
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+@@ -52,7 +52,7 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 0 a 1 a # # NULL NULL # BTREE
++t1 0 a 1 a # # NULL NULL # LSMTREE
+ INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
+ INSERT INTO t1 (a,b) VALUES (1,'c');
+ ERROR 23000: Duplicate entry '1' for key 'a'
diff --git a/storage/rocksdb/mysql-test/storage_engine/index_type_hash.rdiff b/storage/rocksdb/mysql-test/storage_engine/index_type_hash.rdiff
new file mode 100644
index 00000000..815b2983
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/index_type_hash.rdiff
@@ -0,0 +1,60 @@
+--- suite/storage_engine/index_type_hash.result 2017-03-12 04:57:07.169911845 +0200
++++ suite/storage_engine/index_type_hash.reject 2017-08-14 22:51:55.644555163 +0300
+@@ -4,7 +4,7 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 1 a 1 a # # NULL NULL # HASH
++t1 1 a 1 a # # NULL NULL # LSMTREE
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+ b <CHAR_COLUMN>,
+@@ -12,8 +12,8 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 1 a_b 1 a # # NULL NULL # HASH a_b index
+-t1 1 a_b 2 b # # NULL NULL # HASH a_b index
++t1 1 a_b 1 a # # NULL NULL # LSMTREE a_b index
++t1 1 a_b 2 b # # NULL NULL # LSMTREE a_b index
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+ b <CHAR_COLUMN>,
+@@ -22,8 +22,8 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 1 a 1 a # # NULL NULL # HASH
+-t1 1 b 1 b # # NULL NULL # HASH
++t1 1 a 1 a # # NULL NULL # LSMTREE
++t1 1 b 1 b # # NULL NULL # LSMTREE
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+ b <CHAR_COLUMN>,
+@@ -31,7 +31,7 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 0 a 1 a # # NULL NULL # HASH
++t1 0 a 1 a # # NULL NULL # LSMTREE
+ INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
+ INSERT INTO t1 (a,b) VALUES (1,'c');
+ ERROR 23000: Duplicate entry '1' for key 'a'
+@@ -43,7 +43,7 @@
+ ALTER TABLE t1 ADD <CUSTOM_INDEX> (a) USING HASH COMMENT 'simple index on a';
+ SHOW INDEX FROM t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 1 a 1 a # # NULL NULL # HASH simple index on a
++t1 1 a 1 a # # NULL NULL # LSMTREE simple index on a
+ ALTER TABLE t1 DROP KEY a;
+ DROP TABLE t1;
+ CREATE TABLE t1 (a <INT_COLUMN>,
+@@ -52,7 +52,7 @@
+ ) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SHOW KEYS IN t1;
+ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+-t1 0 a 1 a # # NULL NULL # HASH
++t1 0 a 1 a # # NULL NULL # LSMTREE
+ INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
+ INSERT INTO t1 (a,b) VALUES (1,'c');
+ ERROR 23000: Duplicate entry '1' for key 'a'
diff --git a/storage/rocksdb/mysql-test/storage_engine/mask_engine.inc b/storage/rocksdb/mysql-test/storage_engine/mask_engine.inc
new file mode 100644
index 00000000..fc6cd02e
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/mask_engine.inc
@@ -0,0 +1,15 @@
+#
+# This include file just replaces the storage engine under test by the generic string <STORAGE_ENGINE>
+# in the next statement. More masks can be added by defining $add_regex, e.g.
+# let $add_regex = /$data_dir/<DATA_DIR>/ /$index_dir/<INDEX_DIR>/
+#
+
+--let $regex = /$storage_engine/<STORAGE_ENGINE>/i / COLLATE[= ]latin1_bin//
+if ($add_regex)
+{
+ --let $regex = $regex $add_regex
+}
+
+--let $add_regex =
+--replace_regex $regex
+
diff --git a/storage/rocksdb/mysql-test/storage_engine/misc.rdiff b/storage/rocksdb/mysql-test/storage_engine/misc.rdiff
new file mode 100644
index 00000000..cdbad003
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/misc.rdiff
@@ -0,0 +1,34 @@
+--- suite/storage_engine/misc.result 2018-02-23 03:01:49.673249912 +0200
++++ suite/storage_engine/misc.reject 2018-02-23 03:02:05.669249564 +0200
+@@ -28,6 +28,10 @@
+ SELECT TABLE_NAME, COLUMN_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME
+ FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE ORDER BY TABLE_NAME;
+ TABLE_NAME COLUMN_NAME REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
++Warning 1286 Unknown storage engine 'InnoDB'
++Warning 1286 Unknown storage engine 'InnoDB'
++Warning 1286 Unknown storage engine 'InnoDB'
++Warnings:
+ column_stats column_name NULL NULL
+ column_stats db_name NULL NULL
+ column_stats table_name NULL NULL
+@@ -58,12 +62,6 @@
+ index_stats index_name NULL NULL
+ index_stats prefix_arity NULL NULL
+ index_stats table_name NULL NULL
+-innodb_index_stats database_name NULL NULL
+-innodb_index_stats index_name NULL NULL
+-innodb_index_stats stat_name NULL NULL
+-innodb_index_stats table_name NULL NULL
+-innodb_table_stats database_name NULL NULL
+-innodb_table_stats table_name NULL NULL
+ plugin name NULL NULL
+ proc db NULL NULL
+ proc name NULL NULL
+@@ -94,7 +92,5 @@
+ time_zone_transition Transition_time NULL NULL
+ time_zone_transition_type Time_zone_id NULL NULL
+ time_zone_transition_type Transition_type_id NULL NULL
+-transaction_registry commit_id NULL NULL
+-transaction_registry transaction_id NULL NULL
+ user Host NULL NULL
+ user User NULL NULL
diff --git a/storage/rocksdb/mysql-test/storage_engine/parts/checksum_table.rdiff b/storage/rocksdb/mysql-test/storage_engine/parts/checksum_table.rdiff
new file mode 100644
index 00000000..bf3347a4
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/parts/checksum_table.rdiff
@@ -0,0 +1,13 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/parts/checksum_table.result 2017-06-22 00:33:46.419995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/parts/checksum_table.reject 2017-06-22 19:25:02.935568998 +0300
+@@ -31,8 +31,8 @@
+ test.t1 4272806499
+ CHECKSUM TABLE t1, t2 QUICK;
+ Table Checksum
+-test.t1 4272806499
+-test.t2 0
++test.t1 NULL
++test.t2 NULL
+ CHECKSUM TABLE t1, t2 EXTENDED;
+ Table Checksum
+ test.t1 4272806499
diff --git a/storage/rocksdb/mysql-test/storage_engine/parts/create_table.rdiff b/storage/rocksdb/mysql-test/storage_engine/parts/create_table.rdiff
new file mode 100644
index 00000000..b2cb47a0
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/parts/create_table.rdiff
@@ -0,0 +1,20 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/parts/create_table.result 2017-06-22 00:33:46.419995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/parts/create_table.reject 2017-06-22 19:25:05.335568983 +0300
+@@ -65,7 +65,7 @@
+ 1 SIMPLE t1 abc,def # # # # # # #
+ EXPLAIN PARTITIONS SELECT a FROM t1 WHERE a = 100;
+ id select_type table partitions type possible_keys key key_len ref rows Extra
+-1 SIMPLE NULL NULL # # # # # # #
++1 SIMPLE t1 def # # # # # # #
+ INSERT INTO t1 (a) VALUES (50);
+ ERROR HY000: Table has no partition for value 50
+ DROP TABLE t1;
+@@ -81,7 +81,7 @@
+ 1 SIMPLE t1 abc_abcsp0,def_defsp0 # # # # # # #
+ EXPLAIN PARTITIONS SELECT a FROM t1 WHERE a = 100;
+ id select_type table partitions type possible_keys key key_len ref rows Extra
+-1 SIMPLE NULL NULL # # # # # # #
++1 SIMPLE t1 def_defsp0 # # # # # # #
+ SELECT TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME, SUBPARTITION_NAME, PARTITION_METHOD, SUBPARTITION_METHOD
+ FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1';
+ TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_METHOD SUBPARTITION_METHOD
diff --git a/storage/rocksdb/mysql-test/storage_engine/parts/disabled.def b/storage/rocksdb/mysql-test/storage_engine/parts/disabled.def
new file mode 100644
index 00000000..ef8ad5b3
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/parts/disabled.def
@@ -0,0 +1,3 @@
+alter_table : MDEV-13153 - Assertion `global_status_var.global_memory_used == 0'
+optimize_table : MDEV-13148 - LOCK TABLE on RocksDB table fails with a bogus error message
+repair_table : MDEV-13148 - LOCK TABLE on RocksDB table fails with a bogus error message
diff --git a/storage/rocksdb/mysql-test/storage_engine/parts/suite.opt b/storage/rocksdb/mysql-test/storage_engine/parts/suite.opt
new file mode 100644
index 00000000..d77a8227
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/parts/suite.opt
@@ -0,0 +1 @@
+--ignore-db-dirs=#rocksdb --plugin-load=$HA_ROCKSDB_SO --binlog_format=ROW --loose-rocksdb_flush_log_at_trx_commit=0
diff --git a/storage/rocksdb/mysql-test/storage_engine/show_engine.rdiff b/storage/rocksdb/mysql-test/storage_engine/show_engine.rdiff
new file mode 100644
index 00000000..15a9bb6f
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/show_engine.rdiff
@@ -0,0 +1,15 @@
+--- suite/storage_engine/show_engine.result 2017-03-12 04:57:07.169911845 +0200
++++ suite/storage_engine/show_engine.reject 2017-08-14 22:58:15.508554871 +0300
+@@ -4,7 +4,11 @@
+ # volatile data (timestamps, memory info, etc.)
+ SHOW ENGINE <STORAGE_ENGINE> STATUS;
+ Type Name Status
+-<STORAGE_ENGINE> ### Engine status, can be long and changeable ###
++STATISTICS <STORAGE_ENGINE> ### Engine status, can be long and changeable ###
++DBSTATS <STORAGE_ENGINE> ### Engine status, can be long and changeable ###
++CF_COMPACTION __system__ ### Engine status, can be long and changeable ###
++CF_COMPACTION default ### Engine status, can be long and changeable ###
++MEMORY_STATS <STORAGE_ENGINE> ### Engine status, can be long and changeable ###
+ # For SHOW MUTEX even the number of lines is volatile, so the result logging is disabled,
+ # the test only checks that the command does not produce any errors
+ SHOW ENGINE <STORAGE_ENGINE> MUTEX;
diff --git a/storage/rocksdb/mysql-test/storage_engine/show_table_status.rdiff b/storage/rocksdb/mysql-test/storage_engine/show_table_status.rdiff
new file mode 100644
index 00000000..d7252eb5
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/show_table_status.rdiff
@@ -0,0 +1,20 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/show_table_status.result 2017-06-22 00:33:46.423995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/show_table_status.reject 2017-06-22 14:04:10.723690009 +0300
+@@ -19,7 +19,7 @@
+ Create_time ###
+ Update_time ###
+ Check_time NULL
+-Collation latin1_swedish_ci
++Collation latin1_bin
+ Checksum NULL
+ Create_options
+ Comment
+@@ -37,7 +37,7 @@
+ Create_time ###
+ Update_time ###
+ Check_time NULL
+-Collation latin1_swedish_ci
++Collation latin1_bin
+ Checksum NULL
+ Create_options
+ Comment
diff --git a/storage/rocksdb/mysql-test/storage_engine/suite.opt b/storage/rocksdb/mysql-test/storage_engine/suite.opt
new file mode 100644
index 00000000..e6122c7e
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/suite.opt
@@ -0,0 +1 @@
+--ignore-db-dirs=#rocksdb --plugin-load=$HA_ROCKSDB_SO --binlog_format=ROW --collation-server=latin1_bin --loose-rocksdb_flush_log_at_trx_commit=0
diff --git a/storage/rocksdb/mysql-test/storage_engine/tbl_opt_insert_method.rdiff b/storage/rocksdb/mysql-test/storage_engine/tbl_opt_insert_method.rdiff
new file mode 100644
index 00000000..20f594fb
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/tbl_opt_insert_method.rdiff
@@ -0,0 +1,11 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/tbl_opt_insert_method.result 2017-06-22 00:33:46.423995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/tbl_opt_insert_method.reject 2017-06-22 02:39:45.243948128 +0300
+@@ -5,7 +5,7 @@
+ t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` char(8) DEFAULT NULL
+-) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 INSERT_METHOD=FIRST
++) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1
+ ALTER TABLE t1 INSERT_METHOD=NO;
+ SHOW CREATE TABLE t1;
+ Table Create Table
diff --git a/storage/rocksdb/mysql-test/storage_engine/tbl_opt_union.rdiff b/storage/rocksdb/mysql-test/storage_engine/tbl_opt_union.rdiff
new file mode 100644
index 00000000..0d65ad07
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/tbl_opt_union.rdiff
@@ -0,0 +1,16 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/tbl_opt_union.result 2017-06-22 00:33:46.423995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/tbl_opt_union.reject 2017-06-22 02:41:02.719947641 +0300
+@@ -4,11 +4,11 @@
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+-) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 UNION=(`child1`)
++) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1
+ ALTER TABLE t1 UNION = (child1,child2);
+ SHOW CREATE TABLE t1;
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+-) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 UNION=(`child1`,`child2`)
++) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1
+ DROP TABLE t1, child1, child2;
diff --git a/storage/rocksdb/mysql-test/storage_engine/tbl_temporary.rdiff b/storage/rocksdb/mysql-test/storage_engine/tbl_temporary.rdiff
new file mode 100644
index 00000000..d24806e7
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/tbl_temporary.rdiff
@@ -0,0 +1,24 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/tbl_temporary.result 2017-06-22 00:33:46.423995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/tbl_temporary.reject 2017-06-22 15:27:50.643658456 +0300
+@@ -1,11 +1,14 @@
+ DROP TABLE IF EXISTS t1;
+ CREATE TABLE t1 (c CHAR(1)) ENGINE=MyISAM;
+ CREATE TEMPORARY TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+-SHOW CREATE TABLE t1;
+-Table Create Table
+-t1 CREATE TEMPORARY TABLE `t1` (
+- `a` int(11) DEFAULT NULL,
+- `b` char(8) DEFAULT NULL
+-) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1
+-DROP TEMPORARY TABLE t1;
++ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY'
++# ERROR: Statement ended with errno 1478, errname ER_ILLEGAL_HA_CREATE_OPTION (expected to succeed)
++# ------------ UNEXPECTED RESULT ------------
++# [ CREATE TEMPORARY TABLE t1 (a INT(11) /*!*/ /*Custom column options*/, b CHAR(8) /*!*/ /*Custom column options*/) ENGINE=RocksDB /*!*/ /*Custom table options*/ ]
++# The statement|command finished with ER_ILLEGAL_HA_CREATE_OPTION.
++# Temporary tables or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors.
++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def.
++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped.
++# Also, this problem may cause a chain effect (more errors of different kinds in the test).
++# -------------------------------------------
+ DROP TABLE t1;
diff --git a/storage/rocksdb/mysql-test/storage_engine/truncate_table.rdiff b/storage/rocksdb/mysql-test/storage_engine/truncate_table.rdiff
new file mode 100644
index 00000000..9ca7861d
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/truncate_table.rdiff
@@ -0,0 +1,24 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/truncate_table.result 2017-06-22 00:33:46.423995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/truncate_table.reject 2017-06-22 02:43:27.183946733 +0300
+@@ -29,13 +29,12 @@
+ CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c');
+ HANDLER t1 OPEN AS h1;
+-HANDLER h1 READ FIRST;
+-a b
+-1 a
+-TRUNCATE TABLE t1;
+-HANDLER h1 READ NEXT;
+-ERROR 42S02: Unknown table 'h1' in HANDLER
+-HANDLER t1 OPEN AS h2;
+-HANDLER h2 READ FIRST;
+-a b
++ERROR HY000: Storage engine ROCKSDB of the table `test`.`t1` doesn't have this option
++# ------------ UNEXPECTED RESULT ------------
++# The statement|command finished with ER_ILLEGAL_HA.
++# HANDLER or the syntax or the mix could be unsupported.
++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def.
++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped.
++# Also, this problem may cause a chain effect (more errors of different kinds in the test).
++# -------------------------------------------
+ DROP TABLE t1;
diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/delete.rdiff b/storage/rocksdb/mysql-test/storage_engine/trx/delete.rdiff
new file mode 100644
index 00000000..dac23b83
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/trx/delete.rdiff
@@ -0,0 +1,10 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/delete.result 2017-06-22 00:33:46.423995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/delete.reject 2017-06-22 19:29:36.827567276 +0300
+@@ -68,5 +68,7 @@
+ DELETE FROM t1;
+ INSERT INTO t1 (a,b) VALUES (1,'a');
+ ROLLBACK TO SAVEPOINT spt1;
++ERROR HY000: MyRocks currently does not support ROLLBACK TO SAVEPOINT if modifying rows.
+ COMMIT;
++ERROR HY000: This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction.
+ DROP TABLE t1;
diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/disabled.def b/storage/rocksdb/mysql-test/storage_engine/trx/disabled.def
new file mode 100644
index 00000000..4e227c10
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/trx/disabled.def
@@ -0,0 +1,4 @@
+cons_snapshot_serializable : Not supported
+level_read_uncommitted : Not supported
+level_serializable : Not supported
+xa_recovery : MDEV-13155 - XA recovery not supported for RocksDB
diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/insert.rdiff b/storage/rocksdb/mysql-test/storage_engine/trx/insert.rdiff
new file mode 100644
index 00000000..36a71076
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/trx/insert.rdiff
@@ -0,0 +1,24 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/insert.result 2017-06-22 00:33:46.423995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/insert.reject 2017-06-22 19:29:39.131567262 +0300
+@@ -37,18 +37,18 @@
+ INSERT INTO t1 SET a = 11, b = 'f';
+ INSERT t1 SET b = DEFAULT;
+ ROLLBACK TO SAVEPOINT spt1;
++ERROR HY000: MyRocks currently does not support ROLLBACK TO SAVEPOINT if modifying rows.
+ INSERT INTO t1 (b,a) VALUES ('test1',10);
++ERROR HY000: This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction.
+ COMMIT;
++ERROR HY000: This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction.
+ SELECT a,b FROM t1;
+ a b
+ 1 a
+-10 NULL
+ 10 foo
+-10 test1
+ 100 foo
+ 11 abc
+ 2 b
+-20 NULL
+ 3 c
+ 4 d
+ 5 e
diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/level_read_committed.rdiff b/storage/rocksdb/mysql-test/storage_engine/trx/level_read_committed.rdiff
new file mode 100644
index 00000000..6b9e4a3f
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/trx/level_read_committed.rdiff
@@ -0,0 +1,10 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/level_read_committed.result 2017-06-22 00:33:46.423995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/level_read_committed.reject 2017-06-22 19:29:41.459567247 +0300
+@@ -77,6 +77,7 @@
+ CREATE TABLE t1 (a <INT_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
+ SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+ START TRANSACTION WITH CONSISTENT SNAPSHOT;
++ERROR HY000: Only REPEATABLE READ isolation level is supported for START TRANSACTION WITH CONSISTENT SNAPSHOT in RocksDB Storage Engine.
+ connection con2;
+ INSERT INTO t1 (a) VALUES (1);
+ connection con1;
diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/level_repeatable_read.rdiff b/storage/rocksdb/mysql-test/storage_engine/trx/level_repeatable_read.rdiff
new file mode 100644
index 00000000..cf770755
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/trx/level_repeatable_read.rdiff
@@ -0,0 +1,35 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/level_repeatable_read.result 2017-06-22 00:33:46.423995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/level_repeatable_read.reject 2017-06-22 20:33:13.935543284 +0300
+@@ -24,8 +24,7 @@
+ SELECT a FROM t1;
+ a
+ INSERT INTO t1 (a) SELECT a+100 FROM t1;
+-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+-# WARNING: Statement ended with errno 1205, errname 'ER_LOCK_WAIT_TIMEOUT'.
++# WARNING: Statement ended with errno 0, errname ''.
+ # If it differs from the result file, it might indicate a problem.
+ SELECT a FROM t1;
+ a
+@@ -47,22 +46,16 @@
+ # If it differs from the result file, it might indicate a problem.
+ SELECT a FROM t1;
+ a
+-201
+-202
+ COMMIT;
+ SELECT a FROM t1;
+ a
+ 1
+ 2
+-201
+-202
+ connection con2;
+ SELECT a FROM t1;
+ a
+ 1
+ 2
+-201
+-202
+ connection default;
+ disconnect con1;
+ disconnect con2;
diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/suite.opt b/storage/rocksdb/mysql-test/storage_engine/trx/suite.opt
new file mode 100644
index 00000000..d77a8227
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/trx/suite.opt
@@ -0,0 +1 @@
+--ignore-db-dirs=#rocksdb --plugin-load=$HA_ROCKSDB_SO --binlog_format=ROW --loose-rocksdb_flush_log_at_trx_commit=0
diff --git a/storage/rocksdb/mysql-test/storage_engine/trx/update.rdiff b/storage/rocksdb/mysql-test/storage_engine/trx/update.rdiff
new file mode 100644
index 00000000..ab181947
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/trx/update.rdiff
@@ -0,0 +1,38 @@
+--- /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/update.result 2017-06-22 00:33:46.423995639 +0300
++++ /data/src/bb-10.2-mdev12528/mysql-test/suite/storage_engine/trx/update.reject 2017-06-22 19:29:57.267567148 +0300
+@@ -29,20 +29,23 @@
+ SAVEPOINT spt1;
+ UPDATE t1 SET b = '';
+ ROLLBACK TO SAVEPOINT spt1;
++ERROR HY000: MyRocks currently does not support ROLLBACK TO SAVEPOINT if modifying rows.
+ UPDATE t1 SET b = 'upd' WHERE a = 10050;
++ERROR HY000: This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction.
+ COMMIT;
++ERROR HY000: This transaction was rolled back and cannot be committed. Only supported operation is to roll it back, so all pending changes will be discarded. Please restart another transaction.
+ SELECT a,b FROM t1;
+ a b
+-10050 upd
+-10050 upd
+-51 update2
+-51 update2
+-52 update2
+-52 update2
+-53 update2
+-53 update2
+-54 update2
+-54 update2
+-55 update2
+-55 update2
++10050 NULL
++10050 NULL
++51 NULL
++51 NULL
++52 NULL
++52 NULL
++53 NULL
++53 NULL
++54 NULL
++54 NULL
++55 NULL
++55 NULL
+ DROP TABLE t1;
diff --git a/storage/rocksdb/mysql-test/storage_engine/type_binary_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_binary_indexes.rdiff
new file mode 100644
index 00000000..5eec9d24
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/type_binary_indexes.rdiff
@@ -0,0 +1,11 @@
+--- suite/storage_engine/type_binary_indexes.result 2017-03-12 04:57:07.173911845 +0200
++++ suite/storage_engine/type_binary_indexes.reject 2017-08-14 22:54:02.144555066 +0300
+@@ -91,7 +91,7 @@
+ INSERT INTO t1 (b,b20,v16,v128) SELECT b,b20,v16,v128 FROM t1;
+ EXPLAIN SELECT HEX(SUBSTRING(v16,0,3)) FROM t1 WHERE v16 LIKE 'varchar%';
+ id select_type table type possible_keys key key_len ref rows Extra
+-# # # # # NULL # # # #
++# # # # # v16 # # # #
+ SELECT HEX(SUBSTRING(v16,7,3)) FROM t1 WHERE v16 LIKE 'varchar%';
+ HEX(SUBSTRING(v16,7,3))
+ 723161
diff --git a/storage/rocksdb/mysql-test/storage_engine/type_bit_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_bit_indexes.rdiff
new file mode 100644
index 00000000..e53a33b4
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/type_bit_indexes.rdiff
@@ -0,0 +1,20 @@
+--- suite/storage_engine/type_bit_indexes.result 2017-12-12 20:34:34.000000000 +0200
++++ suite/storage_engine/type_bit_indexes.reject 2017-12-12 20:35:24.539330056 +0200
+@@ -69,7 +69,7 @@
+ (1,0xFFFF,0xFFFFFFFF,0xFFFFFFFFFFFFFFFF);
+ EXPLAIN SELECT HEX(b+c) FROM t1 WHERE c > 1 OR HEX(b) < 0xFFFFFF;
+ id select_type table type possible_keys key key_len ref rows Extra
+-# # # # # b_c # # # #
++# # # # # NULL # # # #
+ SELECT HEX(b+c) FROM t1 WHERE c > 1 OR HEX(b) < 0xFFFFFF;
+ HEX(b+c)
+ 10
+@@ -98,7 +98,7 @@
+ (1,0xFFFF,0xFFFFFFFF,0xFFFFFFFFFFFFFFFF);
+ EXPLAIN SELECT DISTINCT a+0 FROM t1 ORDER BY a;
+ id select_type table type possible_keys key key_len ref rows Extra
+-# # # # # a # # # #
++# # # # # NULL # # # #
+ SELECT DISTINCT a+0 FROM t1 ORDER BY a;
+ a+0
+ 0
diff --git a/storage/rocksdb/mysql-test/storage_engine/type_enum_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_enum_indexes.rdiff
new file mode 100644
index 00000000..be83fb6e
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/type_enum_indexes.rdiff
@@ -0,0 +1,11 @@
+--- suite/storage_engine/type_enum_indexes.result 2017-03-12 04:38:50.000000000 +0200
++++ suite/storage_engine/type_enum_indexes.reject 2017-12-12 20:36:47.455331726 +0200
+@@ -30,7 +30,7 @@
+ t1 0 a_b 2 b # # NULL NULL # #
+ EXPLAIN SELECT a FROM t1 WHERE b > 'test2' ORDER BY a;
+ id select_type table type possible_keys key key_len ref rows Extra
+-# # # # # a_b # # # #
++# # # # # NULL # # # #
+ SELECT a FROM t1 WHERE b > 'test2' ORDER BY a;
+ a
+ Africa
diff --git a/storage/rocksdb/mysql-test/storage_engine/type_set_indexes.rdiff b/storage/rocksdb/mysql-test/storage_engine/type_set_indexes.rdiff
new file mode 100644
index 00000000..2703e81b
--- /dev/null
+++ b/storage/rocksdb/mysql-test/storage_engine/type_set_indexes.rdiff
@@ -0,0 +1,20 @@
+--- suite/storage_engine/type_set_indexes.result 2017-03-12 04:38:50.000000000 +0200
++++ suite/storage_engine/type_set_indexes.reject 2017-12-12 20:37:16.187332305 +0200
+@@ -97,7 +97,7 @@
+ Warning 1265 Data truncated for column 'b' at row 7
+ EXPLAIN SELECT a FROM t1 WHERE FIND_IN_SET('Europe',a) > 0;
+ id select_type table type possible_keys key key_len ref rows Extra
+-# # # # # a # # # #
++# # # # # NULL # # # #
+ SELECT a FROM t1 WHERE FIND_IN_SET('Europe',a) > 0;
+ a
+ Africa,Europe,Asia
+@@ -124,7 +124,7 @@
+ Warning 1265 Data truncated for column 'b' at row 7
+ EXPLAIN SELECT DISTINCT a, b FROM t1 ORDER BY b DESC, a;
+ id select_type table type possible_keys key key_len ref rows Extra
+-# # # # # b_a # # # #
++# # # # # NULL # # # #
+ SELECT DISTINCT a, b FROM t1 ORDER BY b DESC, a;
+ a b
+ test1,test3