diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2017-07-29 11:06:22 +0000 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2017-07-29 11:06:22 +0000 |
commit | a89d01fb60dd9feec94262eb62f345080122a51a (patch) | |
tree | 347be49eb2adb72df9c60f9bcd68b7d6d95a6fdc | |
parent | f2952485a12aa835270db23e1cd0c23cf370ff0c (diff) | |
download | mariadb-git-a89d01fb60dd9feec94262eb62f345080122a51a.tar.gz |
Trivial updates to get a few rocksdb.* testcases to pass
15 files changed, 76 insertions, 23 deletions
diff --git a/storage/rocksdb/mysql-test/rocksdb/include/restart_mysqld_with_option.inc b/storage/rocksdb/mysql-test/rocksdb/include/restart_mysqld_with_option.inc new file mode 100644 index 00000000000..4250b368b1a --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/include/restart_mysqld_with_option.inc @@ -0,0 +1,31 @@ + +if ($rpl_inited) +{ + if (!$allow_rpl_inited) + { + --die ERROR IN TEST: This script does not support replication + } +} + +# Write file to make mysql-test-run.pl expect the "crash", but don't start +# it until it's told to +--let $_server_id= `SELECT @@server_id` +--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect +--exec echo "wait" > $_expect_file_name + +# Send shutdown to the connected server and give +# it 10 seconds to die before zapping it +shutdown_server 10; + +# Write file to make mysql-test-run.pl start up the server again +--exec echo "restart:$_mysqld_option" > $_expect_file_name + +# Turn on reconnect +--enable_reconnect + +# Call script that will poll the server waiting for it to be back online again +--source include/wait_until_connected_again.inc + +# Turn off reconnect again +--disable_reconnect + diff --git a/storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key.result b/storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key.result index d86792a6469..5bffab74917 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key.result @@ -241,7 +241,7 @@ a b 2 b EXPLAIN SELECT * FROM t1 WHERE a = 2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const a a 5 const 1 NULL +1 SIMPLE t1 const a a 5 const 1 DROP TABLE t1; CREATE TABLE t1 (a INT, b CHAR(8)) ENGINE=rocksdb; SHOW CREATE TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result b/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result index cd6bde2b381..5cf9c620341 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result @@ -20,7 +20,7 @@ set @tmp1=@@rocksdb_verify_row_debug_checksums; set rocksdb_verify_row_debug_checksums=1; set session debug_dbug= "+d,myrocks_simulate_bad_row_read1"; select * from t1 where pk=1; -ERROR HY000: Got error 199 'Found data corruption.' from ROCKSDB +ERROR HY000: Got error 200 'Found data corruption.' from ROCKSDB set session debug_dbug= "-d,myrocks_simulate_bad_row_read1"; set rocksdb_verify_row_debug_checksums=@tmp1; select * from t1 where pk=1; @@ -28,11 +28,11 @@ pk col1 1 1 set session debug_dbug= "+d,myrocks_simulate_bad_row_read2"; select * from t1 where pk=1; -ERROR HY000: Got error 199 'Found data corruption.' from ROCKSDB +ERROR HY000: Got error 200 'Found data corruption.' from ROCKSDB set session debug_dbug= "-d,myrocks_simulate_bad_row_read2"; set session debug_dbug= "+d,myrocks_simulate_bad_row_read3"; select * from t1 where pk=1; -ERROR HY000: Got error 199 'Found data corruption.' from ROCKSDB +ERROR HY000: Got error 200 'Found data corruption.' from ROCKSDB set session debug_dbug= "-d,myrocks_simulate_bad_row_read3"; insert into t1 values(4,'0123456789'); select * from t1; @@ -56,7 +56,7 @@ pk col1 ABCD 1 set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1"; select * from t2; -ERROR HY000: Got error 199 'Found data corruption.' from ROCKSDB +ERROR HY000: Got error 200 'Found data corruption.' from ROCKSDB set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1"; drop table t2; create table t2 ( @@ -69,6 +69,6 @@ pk col1 ABCD 1 set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1"; select * from t2; -ERROR HY000: Got error 199 'Found data corruption.' from ROCKSDB +ERROR HY000: Got error 200 'Found data corruption.' from ROCKSDB set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1"; drop table t2; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/foreign_key.result b/storage/rocksdb/mysql-test/rocksdb/r/foreign_key.result index 5ffd2774ca2..fa3809e9758 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/foreign_key.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/foreign_key.result @@ -1,16 +1,16 @@ DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 (b INT PRIMARY KEY); CREATE TABLE t2 (a INT NOT NULL, b INT NOT NULL, FOREIGN KEY (b) REFERENCES t1(b)); -ERROR 42000: This version of MySQL doesn't yet support 'FOREIGN KEY for the RocksDB storage engine' +ERROR 42000: This version of MariaDB doesn't yet support 'FOREIGN KEY for the RocksDB storage engine' CREATE TABLE t2 (a INT NOT NULL, bforeign INT NOT NULL); DROP TABLE t2; CREATE TABLE t2 (a INT NOT NULL, foreignkey INT NOT NULL); DROP TABLE t2; CREATE TABLE t2 (a INT NOT NULL, bforeign INT not null, FOREIGN KEY (bforeign) REFERENCES t1(b)); -ERROR 42000: This version of MySQL doesn't yet support 'FOREIGN KEY for the RocksDB storage engine' +ERROR 42000: This version of MariaDB doesn't yet support 'FOREIGN KEY for the RocksDB storage engine' CREATE TABLE t2 (a INT NOT NULL, b INT NOT NULL); ALTER TABLE t2 ADD FOREIGN KEY (b) REFERENCES t1(b); -ERROR 42000: This version of MySQL doesn't yet support 'FOREIGN KEY for the RocksDB storage engine' +ERROR 42000: This version of MariaDB doesn't yet support 'FOREIGN KEY for the RocksDB storage engine' DROP TABLE t2; CREATE TABLE t2 (a INT NOT NULL); ALTER TABLE t2 ADD bforeign INT NOT NULL; @@ -20,6 +20,6 @@ ALTER TABLE t2 ADD foreignkey INT NOT NULL; DROP TABLE t2; CREATE TABLE t2 (a INT NOT NULL); ALTER TABLE t2 ADD bforeign INT NOT NULL, ADD FOREIGN KEY (bforeign) REFERENCES t1(b); -ERROR 42000: This version of MySQL doesn't yet support 'FOREIGN KEY for the RocksDB storage engine' +ERROR 42000: This version of MariaDB doesn't yet support 'FOREIGN KEY for the RocksDB storage engine' DROP TABLE t2; DROP TABLE t1; 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 22c8592ff28..f63a271cdce 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result @@ -31,7 +31,7 @@ test.t1 analyze status OK set global rocksdb_force_flush_memtable_now=1; explain select * from t1 where key1 = 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref key1 key1 5 const # NULL +1 SIMPLE t1 ref key1 key1 5 const # explain select key1,key2 from t1 where key1 = 1 or key2 = 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL # Using union(key1,key2); Using where diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result index b90706e613e..9b7ee0de388 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result @@ -94,7 +94,7 @@ drop table t1, t2; CREATE TABLE t1 (c1 INT NOT NULL, c2 CHAR(5)) PARTITION BY HASH(c1) PARTITIONS 4; INSERT INTO t1 VALUES(1,'a'); RENAME TABLE t1 TO db3.t3; -ERROR HY000: Error on rename of './test/t1' to './db3/t3' (errno: -1 - Unknown error -1) +ERROR HY000: Error on rename of './test/t1' to './db3/t3' (errno: -1 "Internal error < 0 (Not system error)") SELECT * FROM t1; c1 c2 1 a diff --git a/storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_read_filtering.result b/storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_read_filtering.result index 0a91fe3fcbd..1df6e838bcd 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_read_filtering.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_read_filtering.result @@ -171,11 +171,14 @@ SELECT * FROM t1; a b 998 5 DROP TABLE t1; +connect con1,localhost,root,,; +connect con2,localhost,root,,; CREATE TABLE t1 ( a int PRIMARY KEY ) ENGINE=rocksdb COMMENT='ttl_duration=5;'; INSERT INTO t1 values (1); +connection con1; # Creating Snapshot (start transaction) BEGIN; SELECT * FROM t1; @@ -185,11 +188,13 @@ SELECT * FROM t1; a 1 # Switching to connection 2 +connection con2; set global rocksdb_force_flush_memtable_now=1; set global rocksdb_compact_cf='default'; SELECT * FROM t1; a # Switching to connection 1 +connection con1; SELECT * FROM t1; a 1 @@ -201,6 +206,10 @@ COMMIT; SELECT * FROM t1; a DROP TABLE t1; +disconnect con1; +disconnect con2; +connect con1,localhost,root,,; +connect con2,localhost,root,,; set global rocksdb_force_flush_memtable_now=1; set global rocksdb_compact_cf='default'; CREATE TABLE t1 ( @@ -208,11 +217,13 @@ a int PRIMARY KEY ) ENGINE=rocksdb COMMENT='ttl_duration=1;'; # On Connection 1 +connection con1; # Creating Snapshot (start transaction) BEGIN; SELECT * FROM t1; a # On Connection 2 +connection con2; set global rocksdb_debug_ttl_rec_ts = -2; INSERT INTO t1 values (1); INSERT INTO t1 values (3); @@ -222,9 +233,11 @@ set global rocksdb_debug_ttl_rec_ts = 0; set global rocksdb_force_flush_memtable_now=1; set global rocksdb_compact_cf='default'; # On Connection 1 +connection con1; SELECT * FROM t1; a # On Connection 2 +connection con2; SELECT * FROM t1; a set global rocksdb_enable_ttl_read_filtering=0; @@ -235,4 +248,7 @@ a 5 7 set global rocksdb_enable_ttl_read_filtering=1; +disconnect con2; +disconnect con1; +connection default; DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_with_partitions.result b/storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_with_partitions.result index 3816accad8c..d6d9e290e9f 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_with_partitions.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_with_partitions.result @@ -144,16 +144,16 @@ set global rocksdb_debug_ttl_rec_ts = 0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL DEFAULT '0', - `c2` int(11) NOT NULL DEFAULT '0', + `c1` int(11) NOT NULL, + `c2` int(11) NOT NULL, `name` varchar(25) NOT NULL, `event` date DEFAULT NULL, PRIMARY KEY (`c2`,`c1`) COMMENT 'custom_p0_cfname=foo;custom_p1_cfname=bar;custom_p2_cfname=baz;' ) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COMMENT='custom_p0_ttl_duration=9999;custom_p2_ttl_duration=5;' -/*!50100 PARTITION BY LIST (c1) -(PARTITION custom_p0 VALUES IN (1,2,3) ENGINE = ROCKSDB, - PARTITION custom_p1 VALUES IN (4,5,6) ENGINE = ROCKSDB, - PARTITION custom_p2 VALUES IN (7,8,9) ENGINE = ROCKSDB) */ + PARTITION BY LIST (`c1`) +(PARTITION `custom_p0` VALUES IN (1,2,3) ENGINE = ROCKSDB, + PARTITION `custom_p1` VALUES IN (4,5,6) ENGINE = ROCKSDB, + PARTITION `custom_p2` VALUES IN (7,8,9) ENGINE = ROCKSDB) set global rocksdb_debug_ttl_snapshot_ts = 100; set global rocksdb_force_flush_memtable_now=1; set @@global.rocksdb_compact_cf = 'baz'; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf.test b/storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf.test index 5aec6ff5e99..fdacb22a73c 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf.test @@ -1,4 +1,5 @@ --source include/have_rocksdb.inc +--source include/have_partition.inc --let pk_cf=rev:cf1 --let data_order_desc=0 diff --git a/storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf_and_data.test b/storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf_and_data.test index 83006f9e446..11709ac18be 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf_and_data.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf_and_data.test @@ -1,4 +1,5 @@ --source include/have_rocksdb.inc +--source include/have_partition.inc --let pk_cf=rev:cf1 --let data_order_desc=1 diff --git a/storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_data.test b/storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_data.test index df7b6a7c821..a3bcd1b060c 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_data.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_data.test @@ -1,4 +1,5 @@ --source include/have_rocksdb.inc +--source include/have_partition.inc --let pk_cf=cf1 --let data_order_desc=1 diff --git a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def index 883f4475952..fbec7eec6a1 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def +++ b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def @@ -70,3 +70,6 @@ col_opt_null : : MDEV-12474 - Fails in fulltest col_opt_unsigned : MDEV-12474 - Fails in fulltest col_opt_zerofill : MDEV-12474 - Fails in fulltest type_float : MDEV-12474 - Fails in fulltest + +native_procedure : Not supported in MariaDB + diff --git a/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_with_partitions.test b/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_with_partitions.test index dd1a97b32df..aba2b594db5 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_with_partitions.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_with_partitions.test @@ -1,5 +1,6 @@ --source include/have_debug.inc --source include/have_rocksdb.inc +--source include/have_partition.inc # # Create a table with multiple partitions, but in the comment don't specify diff --git a/storage/rocksdb/mysql-test/rocksdb/t/varbinary_format.test b/storage/rocksdb/mysql-test/rocksdb/t/varbinary_format.test index d00a8b7afbe..d10082bb95c 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/varbinary_format.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/varbinary_format.test @@ -34,11 +34,11 @@ DROP TABLE t1; # Now create the same table in the old format to show that they can be read # and handled correctly -set session debug= '+d,MYROCKS_LEGACY_VARBINARY_FORMAT'; +set session debug_dbug= '+d,MYROCKS_LEGACY_VARBINARY_FORMAT'; CREATE TABLE t1( vb VARBINARY(64) primary key ) ENGINE=rocksdb; -set session debug= '-d,MYROCKS_LEGACY_VARBINARY_FORMAT'; +set session debug_dbug= '-d,MYROCKS_LEGACY_VARBINARY_FORMAT'; INSERT INTO t1 values(0x00); INSERT INTO t1 values(0x0000); @@ -98,11 +98,11 @@ DROP TABLE t1; # Now create the same table in the old format to show that they can be read # and handled correctly -set session debug= '+d,MYROCKS_LEGACY_VARBINARY_FORMAT'; +set session debug_dbug= '+d,MYROCKS_LEGACY_VARBINARY_FORMAT'; CREATE TABLE t1( vc VARCHAR(64) collate 'binary' primary key ) ENGINE=rocksdb; -set session debug= '-d,MYROCKS_LEGACY_VARBINARY_FORMAT'; +set session debug_dbug= '-d,MYROCKS_LEGACY_VARBINARY_FORMAT'; INSERT INTO t1 values('a'); INSERT INTO t1 values('aa'); diff --git a/storage/rocksdb/mysql-test/rocksdb/t/write_sync.test b/storage/rocksdb/mysql-test/rocksdb/t/write_sync.test index 0b96b597797..ca953afd65d 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/write_sync.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/write_sync.test @@ -5,7 +5,6 @@ SET GLOBAL rocksdb_write_disable_wal=false; SET GLOBAL rocksdb_write_ignore_missing_column_families=true; create table aaa (id int primary key, i int) engine rocksdb; -set @save_rocksdb_flush_log_at_trx_commit= @@global.rocksdb_flush_log_at_trx_commit; set @save_rocksdb_flush_log_at_trx_commit=@@global.rocksdb_flush_log_at_trx_commit; SET GLOBAL rocksdb_flush_log_at_trx_commit=0; sleep 30; |