diff options
Diffstat (limited to 'storage/rocksdb/mysql-test/rocksdb')
34 files changed, 217 insertions, 60 deletions
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/2pc_group_commit.result b/storage/rocksdb/mysql-test/rocksdb/r/2pc_group_commit.result index ac546a284fc..722edadb4da 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/2pc_group_commit.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/2pc_group_commit.result @@ -14,16 +14,16 @@ SET GLOBAL rocksdb_flush_log_at_trx_commit=1; select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits'; select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits'; select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced'; -select IF(variable_value - @b1 = 1000, 'OK', variable_value - @b1 = 1000) as Binlog_commits +select IF(variable_value - @b1 = 1000, 'OK', variable_value - @b1) as Binlog_commits from information_schema.global_status where variable_name='Binlog_commits'; Binlog_commits OK -select IF(variable_value - @b2 = 1000, 'OK', variable_value - @b2 = 1000) as Binlog_group_commits +select IF(variable_value - @b2 = 1000, 'OK', variable_value - @b2) as Binlog_group_commits from information_schema.global_status where variable_name='Binlog_group_commits'; Binlog_group_commits OK # Prepare operations sync, commits don't. We expect slightly more than 1K syncs: -select IF(variable_value - @b3 between 1000 and 1500, 'OK', variable_value - @b3 between 1000 and 1500) as Rocksdb_wal_synced +select IF(variable_value - @b3 between 1000 and 1500, 'OK', variable_value - @b3) as Rocksdb_wal_synced from information_schema.global_status where variable_name='Rocksdb_wal_synced'; Rocksdb_wal_synced OK @@ -33,17 +33,17 @@ OK select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits'; select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits'; select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced'; -select IF(variable_value - @b1 = 10000, 'OK', variable_value - @b1 = 10000) as Binlog_commits +select IF(variable_value - @b1 = 10000, 'OK', variable_value - @b1) as Binlog_commits from information_schema.global_status where variable_name='Binlog_commits'; Binlog_commits OK -select IF(variable_value - @b2 between 100 and 5000, 'OK', variable_value - @b2 between 100 and 5000) as Binlog_group_commits +select IF(variable_value - @b2 between 100 and 5000, 'OK', variable_value - @b2) as Binlog_group_commits from information_schema.global_status where variable_name='Binlog_group_commits'; Binlog_group_commits OK -select IF(variable_value - @b3 between 1 and 9000, 'OK', variable_value - @b3 between 1 and 9000) +select IF(variable_value - @b3 between 1 and 9000, 'OK', variable_value - @b3) from information_schema.global_status where variable_name='Rocksdb_wal_synced'; -IF(variable_value - @b3 between 1 and 9000, 'OK', variable_value - @b3 between 1 and 9000) +IF(variable_value - @b3 between 1 and 9000, 'OK', variable_value - @b3) OK ## # 2PC enabled, MyRocks durability disabled, single thread @@ -53,17 +53,17 @@ SET GLOBAL rocksdb_flush_log_at_trx_commit=0; select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits'; select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits'; select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced'; -select IF(variable_value - @b1 = 1000, 'OK', variable_value - @b1 = 1000) as Binlog_commits +select IF(variable_value - @b1 = 1000, 'OK', variable_value - @b1) as Binlog_commits from information_schema.global_status where variable_name='Binlog_commits'; Binlog_commits OK -select IF(variable_value - @b2 = 1000, 'OK', variable_value - @b2 = 1000) as Binlog_group_commits +select IF(variable_value - @b2 = 1000, 'OK', variable_value - @b2) as Binlog_group_commits from information_schema.global_status where variable_name='Binlog_group_commits'; Binlog_group_commits OK -select IF(variable_value - @b3 < 10, 'OK', variable_value - @b3 < 10) +select IF(variable_value - @b3 < 10, 'OK', variable_value - @b3) from information_schema.global_status where variable_name='Rocksdb_wal_synced'; -IF(variable_value - @b3 < 10, 'OK', variable_value - @b3 < 10) +IF(variable_value - @b3 < 10, 'OK', variable_value - @b3) OK ## # 2PC enabled, MyRocks durability disabled, concurrent workload @@ -71,17 +71,17 @@ OK select variable_value into @b1 from information_schema.global_status where variable_name='Binlog_commits'; select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits'; select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced'; -select IF(variable_value - @b1 = 10000, 'OK', variable_value - @b1 = 10000) as Binlog_commits +select IF(variable_value - @b1 = 10000, 'OK', variable_value - @b1) as Binlog_commits from information_schema.global_status where variable_name='Binlog_commits'; Binlog_commits OK -select IF(variable_value - @b2 < 8000, 'OK', variable_value - @b2 < 8000) as Binlog_group_commits +select IF(variable_value - @b2 < 8000, 'OK', variable_value - @b2) as Binlog_group_commits from information_schema.global_status where variable_name='Binlog_group_commits'; Binlog_group_commits OK -select IF(variable_value - @b3 < 10, 'OK', variable_value - @b3 < 10) +select IF(variable_value - @b3 < 10, 'OK', variable_value - @b3) from information_schema.global_status where variable_name='Rocksdb_wal_synced'; -IF(variable_value - @b3 < 10, 'OK', variable_value - @b3 < 10) +IF(variable_value - @b3 < 10, 'OK', variable_value - @b3) OK SET GLOBAL rocksdb_enable_2pc= @save_rocksdb_enable_2pc; SET GLOBAL rocksdb_flush_log_at_trx_commit= @save_rocksdb_flush_log_at_trx_commit; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace.result b/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace.result index 32c0537c780..de7717b3480 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace.result @@ -394,30 +394,41 @@ larger larger 1 Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK larger 1 larger 1 Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK select 1300 < 1300 * 1.5 as "same"; same @@ -476,6 +487,7 @@ INSERT INTO t1 (a, b) VALUES (4, 20); set global rocksdb_force_flush_memtable_now=1; analyze table t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK SHOW INDEX in t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment diff --git a/storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result b/storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result index b666a17c81c..3459b6f189b 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/analyze_table.result @@ -5,26 +5,32 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, a INT(11), b CHAR(8)) ENGINE=rocksdb; INSERT INTO t1 VALUES (3,3,'c'); ANALYZE TABLE t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK INSERT INTO t2 VALUES (1,4,'d'); ANALYZE NO_WRITE_TO_BINLOG TABLE t2; Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK INSERT INTO t1 VALUES (4,5,'e'); INSERT INTO t2 VALUES (2,6,'f'); ANALYZE LOCAL TABLE t1, t2; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK DROP TABLE t1, t2; CREATE TABLE t1 (pk INT PRIMARY KEY, a INT(11), KEY(a)) ENGINE=rocksdb; INSERT INTO t1 VALUES (1,1),(2,2),(3,4),(4,7); ANALYZE TABLE t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK INSERT INTO t1 VALUES (5,8),(6,10),(7,11),(8,12); ANALYZE TABLE t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK DROP TABLE t1; # diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result index 21417caf760..51664516bb4 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result @@ -43,8 +43,11 @@ t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_errors.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_errors.result index 3703c208d0b..4ea8cbccc1e 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_errors.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_errors.result @@ -77,7 +77,7 @@ SET rocksdb_bulk_load=1; INSERT INTO t1 VALUES(13, 0); INSERT INTO t1 VALUES(2, 'test 2'); Warnings: -Warning 1366 Incorrect integer value: 'test 2' for column 'b' at row 1 +Warning 1366 Incorrect integer value: 'test 2' for column `test`.`t1`.`b` at row 1 INSERT INTO t1 VALUES(@id, @arg04); SET @@global.table_open_cache=FALSE; Warnings: diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result index 484c2a89c3a..fa8546e3e3c 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result @@ -43,8 +43,11 @@ t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result index 35a2845cb42..e3870dc37a8 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result @@ -43,8 +43,11 @@ t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result index 12013539017..5b432aec5da 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result @@ -43,8 +43,11 @@ t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result index 444f997bf48..632b3b47eb5 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result @@ -80,8 +80,11 @@ t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result index dea69b3b089..b5a56b21f5e 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result @@ -80,8 +80,11 @@ t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary diff --git a/storage/rocksdb/mysql-test/rocksdb/r/cardinality.result b/storage/rocksdb/mysql-test/rocksdb/r/cardinality.result index d037c636a16..ce29ee04b30 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/cardinality.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/cardinality.result @@ -88,6 +88,7 @@ ENGINE=ROCKSDB; SET GLOBAL rocksdb_force_flush_memtable_now = 1; ANALYZE TABLE t2; Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK cardinality of the columns after 'a' must be equal to the cardinality of column 'a' SELECT CARDINALITY INTO @c FROM information_schema.statistics WHERE TABLE_NAME='t2' AND INDEX_NAME='c' AND COLUMN_NAME='a'; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result index 2ae965b6cfc..64d87b7116d 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result @@ -577,8 +577,8 @@ b1 b2 0 0 INSERT INTO t1 (b1,b2) VALUES ('a','b'); Warnings: -Warning 1366 Incorrect integer value: 'a' for column 'b1' at row 1 -Warning 1366 Incorrect integer value: 'b' for column 'b2' at row 1 +Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`b1` at row 1 +Warning 1366 Incorrect integer value: 'b' for column `test`.`t1`.`b2` at row 1 SELECT b1,b2 FROM t1; b1 b2 -1 -2 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result index a834310417e..ba651fcbb14 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result @@ -500,8 +500,8 @@ b1 b2 0 0 INSERT INTO t1 (b1,b2) VALUES ('a','b'); Warnings: -Warning 1366 Incorrect integer value: 'a' for column 'b1' at row 1 -Warning 1366 Incorrect integer value: 'b' for column 'b2' at row 1 +Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`b1` at row 1 +Warning 1366 Incorrect integer value: 'b' for column `test`.`t1`.`b2` at row 1 SELECT b1,b2 FROM t1; b1 b2 -1 -2 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/drop_index_inplace.result b/storage/rocksdb/mysql-test/rocksdb/r/drop_index_inplace.result index dfa5c5b2590..44f4af7b30f 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/drop_index_inplace.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/drop_index_inplace.result @@ -139,6 +139,7 @@ INSERT INTO t1 (col1,col2,col3) VALUES (1,2,3); ALTER TABLE t1 ADD KEY idx ( col1, col2 ); ANALYZE TABLE t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK ALTER TABLE t1 DROP COLUMN col2; ALTER TABLE t1 DROP COLUMN col3; @@ -148,6 +149,7 @@ INSERT INTO t1 (col1,col2,col3) VALUES (1,2,3); ALTER TABLE t1 ADD KEY idx ( col1, col2 ); ANALYZE TABLE t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK ALTER TABLE t1 DROP COLUMN col2; ALTER TABLE t1 DROP COLUMN col3; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result b/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result index 7fb9055083b..7c4f57b61bd 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result @@ -28,6 +28,7 @@ insert into t1 values (1, 100, 100), (1, 200, 200), (1, 300, 300); set global rocksdb_force_flush_memtable_now=1; analyze table t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK explain select * from t1 where key1 = 1; id select_type table type possible_keys key key_len ref rows Extra diff --git a/storage/rocksdb/mysql-test/rocksdb/r/issue255.result b/storage/rocksdb/mysql-test/rocksdb/r/issue255.result index c1d9ef4574c..d9b8f0e0851 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/issue255.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/issue255.result @@ -2,7 +2,7 @@ CREATE TABLE t1 (pk BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT); INSERT INTO t1 VALUES (5); SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed 1 # # # # # 6 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 6 NULL NULL NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 VALUES ('538647864786478647864'); Warnings: Warning 1264 Out of range value for column 'pk' at row 1 @@ -21,7 +21,7 @@ pk 9223372036854775807 SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed 2 # # # # # 9223372036854775807 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 9223372036854775807 NULL NULL NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 VALUES (); ERROR 23000: Duplicate entry '9223372036854775807' for key 'PRIMARY' SELECT * FROM t1; @@ -30,13 +30,13 @@ pk 9223372036854775807 SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed 2 # # # # # 9223372036854775807 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 9223372036854775807 NULL NULL NULL latin1_swedish_ci NULL 0 N DROP TABLE t1; CREATE TABLE t1 (pk TINYINT NOT NULL PRIMARY KEY AUTO_INCREMENT); INSERT INTO t1 VALUES (5); SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed 1 # # # # # 6 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 6 NULL NULL NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 VALUES (1000); Warnings: Warning 1264 Out of range value for column 'pk' at row 1 @@ -46,7 +46,7 @@ pk 127 SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed 2 # # # # # 127 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 127 NULL NULL NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 VALUES (); ERROR 23000: Duplicate entry '127' for key 'PRIMARY' SELECT * FROM t1; @@ -55,7 +55,7 @@ pk 127 SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed 2 # # # # # 127 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 127 NULL NULL NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 VALUES (); ERROR 23000: Duplicate entry '127' for key 'PRIMARY' SELECT * FROM t1; @@ -64,5 +64,5 @@ pk 127 SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed 2 # # # # # 127 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 127 NULL NULL NULL latin1_swedish_ci NULL 0 N DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/misc.result b/storage/rocksdb/mysql-test/rocksdb/r/misc.result index f19f7f82ab7..b2e5d04f6f8 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/misc.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/misc.result @@ -46,6 +46,8 @@ db User NULL NULL event db NULL NULL event name NULL NULL func name NULL NULL +global_priv Host NULL NULL +global_priv User NULL NULL gtid_slave_pos domain_id NULL NULL gtid_slave_pos sub_id NULL NULL help_category help_category_id NULL NULL @@ -90,5 +92,3 @@ time_zone_transition Time_zone_id NULL NULL 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 -user Host NULL NULL -user User NULL NULL diff --git a/storage/rocksdb/mysql-test/rocksdb/r/partition.result b/storage/rocksdb/mysql-test/rocksdb/r/partition.result index 1ba966e9e07..a7f2a6112c1 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/partition.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/partition.result @@ -46,6 +46,7 @@ CREATE TABLE t1 (i INT, j INT, k INT, PRIMARY KEY (i)) ENGINE = ROCKSDB PARTITIO Table Op Msg_type Msg_text test.t1 optimize status OK Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK Table Op Msg_type Msg_text test.t1 repair status OK diff --git a/storage/rocksdb/mysql-test/rocksdb/r/records_in_range.result b/storage/rocksdb/mysql-test/rocksdb/r/records_in_range.result index 89ebe760384..9bbbdec4794 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/records_in_range.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/records_in_range.result @@ -144,7 +144,7 @@ Warnings: Note 1003 select `test`.`t1`.`i` AS `i`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` >= 500 and `test`.`t1`.`b` <= 500 explain extended select * from t1 where a< 750 and b> 500 and b< 750; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 range ka,kb ka 5 NULL 1000 100.00 Using index condition; Using where +1 SIMPLE t1 range ka,kb ka 5 NULL 1000 5.00 Using index condition; Using where Warnings: Note 1003 select `test`.`t1`.`i` AS `i`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` < 750 and `test`.`t1`.`b` > 500 and `test`.`t1`.`b` < 750 drop index ka on t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result index 6a21a339207..e18bb5f9c0c 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result @@ -2451,9 +2451,9 @@ DROP TABLE t1; CREATE TABLE t2(id INT NOT NULL PRIMARY KEY, data INT) Engine=MEMORY; INSERT INTO t2 VALUES (100,NULL),(150,"long varchar"),(200,"varchar"),(250,"long long long varchar"); Warnings: -Warning 1366 Incorrect integer value: 'long varchar' for column 'data' at row 2 -Warning 1366 Incorrect integer value: 'varchar' for column 'data' at row 3 -Warning 1366 Incorrect integer value: 'long long long varchar' for column 'data' at row 4 +Warning 1366 Incorrect integer value: 'long varchar' for column `test`.`t2`.`data` at row 2 +Warning 1366 Incorrect integer value: 'varchar' for column `test`.`t2`.`data` at row 3 +Warning 1366 Incorrect integer value: 'long long long varchar' for column `test`.`t2`.`data` at row 4 create TABLE t1 (a int not null, b int not null, primary key(a,b)); INSERT INTO t1 VALUES (1,1); SELECT a FROM t1, t2 WHERE a=b AND (b NOT IN (SELECT a FROM t1 WHERE a > 4)); @@ -2542,10 +2542,10 @@ a truncate t1; INSERT INTO t1 VALUES(X'042000200020',X'042000200020'),(X'200400200020',X'200400200020'); Warnings: -Warning 1366 Incorrect integer value: '\x04 \x00 \x00 ' for column 'a' at row 1 -Warning 1366 Incorrect integer value: '\x04 \x00 \x00 ' for column 'b' at row 1 -Warning 1366 Incorrect integer value: ' \x04\x00 \x00 ' for column 'a' at row 2 -Warning 1366 Incorrect integer value: ' \x04\x00 \x00 ' for column 'b' at row 2 +Warning 1366 Incorrect integer value: '\x04 \x00 \x00 ' for column `test`.`t1`.`a` at row 1 +Warning 1366 Incorrect integer value: '\x04 \x00 \x00 ' for column `test`.`t1`.`b` at row 1 +Warning 1366 Incorrect integer value: ' \x04\x00 \x00 ' for column `test`.`t1`.`a` at row 2 +Warning 1366 Incorrect integer value: ' \x04\x00 \x00 ' for column `test`.`t1`.`b` at row 2 UNLOCK TABLES; DROP TABLE t1; # diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result index 99186153796..24b93ee3395 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result @@ -350,6 +350,8 @@ cf_name another_cf_for_p5 ANALYZE TABLE t2; Table Op Msg_type Msg_text +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze Warning Engine-independent statistics are not collected for column 'col5' test.t2 analyze status OK EXPLAIN PARTITIONS SELECT * FROM t2 WHERE col3 = 0x4 AND col2 = 0x34567; id select_type table partitions type possible_keys key key_len ref rows Extra diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range2.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range2.result index 10a6a02008e..bcda9341f1f 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range2.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range2.result @@ -1,11 +1,29 @@ create table t1 (id1 bigint, id2 bigint, c1 bigint, c2 bigint, c3 bigint, c4 bigint, c5 bigint, c6 bigint, c7 bigint, primary key (id1, id2), index i(c1, c2)); analyze table t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK select count(*) from t1; count(*) 10000 explain select c1 from t1 where c1 > 5 limit 10; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range i i 9 NULL # Using where; Using index +1 SIMPLE t1 index i i 18 NULL # Using where; Using index +drop table t1; +# +# MDEV-17414: MyROCKS order desc limit 1 fails +# +create table t1 (date date); +insert into t1 values ('2018-10-04'), ('2018-10-05'); +select * from t1 where date < '2018-10-09' order by date desc limit 1; +date +2018-10-05 +alter table t1 add index date_index (date); +select * from t1 where date < '2018-10-05' order by date desc limit 1; +date +2018-10-04 +# this should not produce an empty set: +select * from t1 where date < '2018-10-09' order by date desc limit 1; +date +2018-10-05 drop table t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/statistics.result b/storage/rocksdb/mysql-test/rocksdb/r/statistics.result index 78344991360..24f3463bf11 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/statistics.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/statistics.result @@ -49,8 +49,11 @@ t2 1 1 t3 1 1 analyze table t1,t2,t3,t4,t5; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK test.t4 analyze Error Table 'test.t4' doesn't exist test.t4 analyze status Operation failed diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_bool.result b/storage/rocksdb/mysql-test/rocksdb/r/type_bool.result index 4abfdb49f37..bfe2c18acb4 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/type_bool.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/type_bool.result @@ -45,8 +45,8 @@ b1 b2 0 0 INSERT INTO t1 (b1,b2) VALUES ('a','b'); Warnings: -Warning 1366 Incorrect integer value: 'a' for column 'b1' at row 1 -Warning 1366 Incorrect integer value: 'b' for column 'b2' at row 1 +Warning 1366 Incorrect integer value: 'a' for column `test`.`t1`.`b1` at row 1 +Warning 1366 Incorrect integer value: 'b' for column `test`.`t1`.`b2` at row 1 SELECT b1,b2 FROM t1; b1 b2 -1 -2 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_decimal.result b/storage/rocksdb/mysql-test/rocksdb/r/type_decimal.result index 7397ff64ab1..668a927669a 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/type_decimal.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/type_decimal.result @@ -25,6 +25,7 @@ insert into t1 select pk+10000, 9.0, 9.0, 'extra-data' from t1; insert into t1 select pk+100000, 9.0, 9.0, 'extra-data' from t1; analyze table t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK # The following can't use index-only: explain select * from t1 where col1 between -8 and 8; @@ -88,6 +89,7 @@ insert into t1 select pk+10000, col1+20000, col2+20000, 'extra-data' from t1; insert into t1 select pk+100000, col1+20000, col2+20000, 'extra-data' from t1; analyze table t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK explain select col1, col2 from t1 force index(key1) where col1 between -800 and 800; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result index a7e086fde66..4c5ef47590a 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result @@ -191,6 +191,7 @@ insert into t1 values (2, 'a', 'a'); insert into t1 values (3, 'a \t', 'a-tab'); analyze table t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK # Must show 'using index' for latin1_bin and utf8_bin: explain @@ -306,6 +307,7 @@ insert into t1 values (2, 'a', 'a'); insert into t1 values (3, 'a \t', 'a-tab'); analyze table t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK # Must show 'using index' for latin1_bin and utf8_bin: explain @@ -421,6 +423,7 @@ insert into t1 values (2, 'a', 'a'); insert into t1 values (3, 'a \t', 'a-tab'); analyze table t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK # Must show 'using index' for latin1_bin and utf8_bin: explain @@ -536,6 +539,7 @@ insert into t1 values (2, 'a', 'a'); insert into t1 values (3, 'a \t', 'a-tab'); analyze table t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK # Must show 'using index' for latin1_bin and utf8_bin: explain @@ -651,6 +655,7 @@ insert into t1 values (2, 'a', 'a'); insert into t1 values (3, 'a \t', 'a-tab'); analyze table t1; Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK # Must show 'using index' for latin1_bin and utf8_bin: explain diff --git a/storage/rocksdb/mysql-test/rocksdb/r/xa.result b/storage/rocksdb/mysql-test/rocksdb/r/xa.result new file mode 100644 index 00000000000..30cfe94e0b7 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/r/xa.result @@ -0,0 +1,32 @@ +# +# MDEV-13155: XA recovery not supported for RocksDB (Just a testcase) +# +call mtr.add_suppression("Found .* prepared XA transactions"); +connect con1,localhost,root,,test; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a INT) ENGINE=RocksDB; +XA START 'xa1'; +INSERT INTO t1 (a) VALUES (1),(2); +XA END 'xa1'; +XA PREPARE 'xa1'; +connect con2,localhost,root,,test; +XA START 'xa2'; +INSERT INTO t1 (a) VALUES (3); +INSERT INTO t1 (a) VALUES (4); +XA END 'xa2'; +XA PREPARE 'xa2'; +connection default; +SELECT * FROM t1; +a +connect con3,localhost,root,,test; +XA RECOVER; +formatID gtrid_length bqual_length data +1 3 0 xa1 +1 3 0 xa2 +XA ROLLBACK 'xa1'; +XA COMMIT 'xa2'; +SELECT a FROM t1; +a +3 +4 +DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test b/storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test index d91d54a3543..af9d2667e82 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test @@ -31,12 +31,12 @@ select variable_value into @b1 from information_schema.global_status where varia select variable_value into @b2 from information_schema.global_status where variable_name='Binlog_group_commits'; select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced'; --exec $MYSQL_SLAP --silent --concurrency=1 --number-of-queries=1000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)" -select IF(variable_value - @b1 = 1000, 'OK', variable_value - @b1 = 1000) as Binlog_commits +select IF(variable_value - @b1 = 1000, 'OK', variable_value - @b1) as Binlog_commits from information_schema.global_status where variable_name='Binlog_commits'; -select IF(variable_value - @b2 = 1000, 'OK', variable_value - @b2 = 1000) as Binlog_group_commits +select IF(variable_value - @b2 = 1000, 'OK', variable_value - @b2) as Binlog_group_commits from information_schema.global_status where variable_name='Binlog_group_commits'; --echo # Prepare operations sync, commits don't. We expect slightly more than 1K syncs: -select IF(variable_value - @b3 between 1000 and 1500, 'OK', variable_value - @b3 between 1000 and 1500) as Rocksdb_wal_synced +select IF(variable_value - @b3 between 1000 and 1500, 'OK', variable_value - @b3) as Rocksdb_wal_synced from information_schema.global_status where variable_name='Rocksdb_wal_synced'; --echo ## @@ -48,11 +48,11 @@ select variable_value into @b3 from information_schema.global_status where varia --exec $MYSQL_SLAP --silent --concurrency=50 --number-of-queries=10000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)" -select IF(variable_value - @b1 = 10000, 'OK', variable_value - @b1 = 10000) as Binlog_commits +select IF(variable_value - @b1 = 10000, 'OK', variable_value - @b1) as Binlog_commits from information_schema.global_status where variable_name='Binlog_commits'; -select IF(variable_value - @b2 between 100 and 5000, 'OK', variable_value - @b2 between 100 and 5000) as Binlog_group_commits +select IF(variable_value - @b2 between 100 and 5000, 'OK', variable_value - @b2) as Binlog_group_commits from information_schema.global_status where variable_name='Binlog_group_commits'; -select IF(variable_value - @b3 between 1 and 9000, 'OK', variable_value - @b3 between 1 and 9000) +select IF(variable_value - @b3 between 1 and 9000, 'OK', variable_value - @b3) from information_schema.global_status where variable_name='Rocksdb_wal_synced'; --echo ## @@ -66,11 +66,11 @@ select variable_value into @b2 from information_schema.global_status where varia select variable_value into @b3 from information_schema.global_status where variable_name='Rocksdb_wal_synced'; --exec $MYSQL_SLAP --silent --concurrency=1 --number-of-queries=1000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)" -select IF(variable_value - @b1 = 1000, 'OK', variable_value - @b1 = 1000) as Binlog_commits +select IF(variable_value - @b1 = 1000, 'OK', variable_value - @b1) as Binlog_commits from information_schema.global_status where variable_name='Binlog_commits'; -select IF(variable_value - @b2 = 1000, 'OK', variable_value - @b2 = 1000) as Binlog_group_commits +select IF(variable_value - @b2 = 1000, 'OK', variable_value - @b2) as Binlog_group_commits from information_schema.global_status where variable_name='Binlog_group_commits'; -select IF(variable_value - @b3 < 10, 'OK', variable_value - @b3 < 10) +select IF(variable_value - @b3 < 10, 'OK', variable_value - @b3) from information_schema.global_status where variable_name='Rocksdb_wal_synced'; --echo ## @@ -83,11 +83,11 @@ select variable_value into @b3 from information_schema.global_status where varia --exec $MYSQL_SLAP --silent --concurrency=50 --number-of-queries=10000 --query="INSERT INTO t1 (id, value) VALUES(NULL, 1)" -select IF(variable_value - @b1 = 10000, 'OK', variable_value - @b1 = 10000) as Binlog_commits +select IF(variable_value - @b1 = 10000, 'OK', variable_value - @b1) as Binlog_commits from information_schema.global_status where variable_name='Binlog_commits'; -select IF(variable_value - @b2 < 8000, 'OK', variable_value - @b2 < 8000) as Binlog_group_commits +select IF(variable_value - @b2 < 8000, 'OK', variable_value - @b2) as Binlog_group_commits from information_schema.global_status where variable_name='Binlog_group_commits'; -select IF(variable_value - @b3 < 10, 'OK', variable_value - @b3 < 10) +select IF(variable_value - @b3 < 10, 'OK', variable_value - @b3) from information_schema.global_status where variable_name='Rocksdb_wal_synced'; ## diff --git a/storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption-master.opt b/storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption-master.opt new file mode 100644 index 00000000000..70c120604f6 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption-master.opt @@ -0,0 +1 @@ +--rocksdb_flush_log_at_trx_commit=1 diff --git a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def index a9877ed9e64..91bf571371e 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def +++ b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def @@ -24,6 +24,7 @@ select_for_update_skip_locked_nowait: MDEV-11481 create_no_primary_key_table: MariaDB doesn't have --block_create_no_primary_key explicit_snapshot: MariaDB doesn't support Shared/Explicit snapshots percona_nonflushing_analyze_debug : Requires Percona Server's Non-flushing ANALYZE feature +com_rpc_tx : Requires connection attributes and detached sessions ## ## Tests that do not fit MariaDB's test environment. Upstream seems to test @@ -82,3 +83,4 @@ autoinc_debug: Fails with wrong results drop_table: Hangs on shutdown allow_to_start_after_corruption : result difference and assertion failure index_merge_rocksdb2 : result difference +rocksdb_range2 : result difference, update after MDEV-16746 is fixed diff --git a/storage/rocksdb/mysql-test/rocksdb/t/issue255.test b/storage/rocksdb/mysql-test/rocksdb/t/issue255.test index 588b28fbee6..370dece0c6c 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/issue255.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/issue255.test @@ -3,24 +3,24 @@ CREATE TABLE t1 (pk BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT); INSERT INTO t1 VALUES (5); ---replace_column 3 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # SHOW TABLE STATUS LIKE 't1'; INSERT INTO t1 VALUES ('538647864786478647864'); ---replace_column 3 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # SELECT * FROM t1; SHOW TABLE STATUS LIKE 't1'; --error ER_DUP_ENTRY INSERT INTO t1 VALUES (); SELECT * FROM t1; ---replace_column 3 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # SHOW TABLE STATUS LIKE 't1'; --error ER_DUP_ENTRY INSERT INTO t1 VALUES (); SELECT * FROM t1; ---replace_column 3 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # SHOW TABLE STATUS LIKE 't1'; DROP TABLE t1; @@ -28,24 +28,24 @@ DROP TABLE t1; CREATE TABLE t1 (pk TINYINT NOT NULL PRIMARY KEY AUTO_INCREMENT); INSERT INTO t1 VALUES (5); ---replace_column 3 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # SHOW TABLE STATUS LIKE 't1'; INSERT INTO t1 VALUES (1000); SELECT * FROM t1; ---replace_column 3 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # SHOW TABLE STATUS LIKE 't1'; --error ER_DUP_ENTRY INSERT INTO t1 VALUES (); SELECT * FROM t1; ---replace_column 3 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # SHOW TABLE STATUS LIKE 't1'; --error ER_DUP_ENTRY INSERT INTO t1 VALUES (); SELECT * FROM t1; ---replace_column 3 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # SHOW TABLE STATUS LIKE 't1'; DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_range2.test b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_range2.test index a7ac236451e..28010d13753 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_range2.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_range2.test @@ -19,3 +19,15 @@ select count(*) from t1; explain select c1 from t1 where c1 > 5 limit 10; drop table t1; +--echo # +--echo # MDEV-17414: MyROCKS order desc limit 1 fails +--echo # +create table t1 (date date); +insert into t1 values ('2018-10-04'), ('2018-10-05'); +select * from t1 where date < '2018-10-09' order by date desc limit 1; # Works as expected +alter table t1 add index date_index (date); +select * from t1 where date < '2018-10-05' order by date desc limit 1; # Works as expected +--echo # this should not produce an empty set: +select * from t1 where date < '2018-10-09' order by date desc limit 1; +drop table t1; + diff --git a/storage/rocksdb/mysql-test/rocksdb/t/xa-master.opt b/storage/rocksdb/mysql-test/rocksdb/t/xa-master.opt new file mode 100644 index 00000000000..70c120604f6 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/t/xa-master.opt @@ -0,0 +1 @@ +--rocksdb_flush_log_at_trx_commit=1 diff --git a/storage/rocksdb/mysql-test/rocksdb/t/xa.test b/storage/rocksdb/mysql-test/rocksdb/t/xa.test new file mode 100644 index 00000000000..f8f381f0580 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/t/xa.test @@ -0,0 +1,38 @@ +--echo # +--echo # MDEV-13155: XA recovery not supported for RocksDB (Just a testcase) +--echo # + +call mtr.add_suppression("Found .* prepared XA transactions"); + +--connect (con1,localhost,root,,test) +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (a INT) ENGINE=RocksDB; + +XA START 'xa1'; +INSERT INTO t1 (a) VALUES (1),(2); +XA END 'xa1'; +XA PREPARE 'xa1'; + +--connect (con2,localhost,root,,test) +XA START 'xa2'; +INSERT INTO t1 (a) VALUES (3); +INSERT INTO t1 (a) VALUES (4); +XA END 'xa2'; +XA PREPARE 'xa2'; + +--connection default +SELECT * FROM t1; + +--let $shutdown_timeout= 0 +--source include/restart_mysqld.inc + +--connect (con3,localhost,root,,test) +--disable_abort_on_error +XA RECOVER; +XA ROLLBACK 'xa1'; +XA COMMIT 'xa2'; +SELECT a FROM t1; +DROP TABLE t1; |