MyRocks: Post-merge fixes in bulk_load_error.test

This commit is contained in:
Sergei Petrunia 2018-04-17 15:04:15 +03:00
parent a7e5049fec
commit 6bea5e9e0f
2 changed files with 16 additions and 15 deletions

View file

@ -14,27 +14,30 @@ INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(2);
INSERT INTO t1 VALUES(20);
INSERT INTO t1 VALUES(21);
#
# In MyRocks, the following statement will intentionally crash the server.
# In MariaDB, it will cause an error
SET rocksdb_bulk_load=0;
ERROR HY000: Rows inserted during bulk load must not overlap existing rows
#
# Despite the error, bulk load operation is over so the variable value
# will be 0:
select @@rocksdb_bulk_load;
@@rocksdb_bulk_load
0
SHOW VARIABLES LIKE 'rocksdb_bulk_load';
Variable_name Value
rocksdb_bulk_load OFF
call mtr.add_suppression('finalizing last SST file while setting bulk loading variable');
SELECT * FROM t1;
pk
10
11
FOUND 1 /RocksDB: Error [0-9]+ finalizing last SST file while setting bulk loading variable/ in rocksdb.bulk_load_errors.1.err
connect con1,localhost,root,,;
SET rocksdb_bulk_load=1;
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(2);
INSERT INTO t1 VALUES(20);
INSERT INTO t1 VALUES(21);
connection default;
disconnect con1;
SELECT * FROM t1;
pk
10
11
FOUND 1 /RocksDB: Error [0-9]+ finalizing last SST file while disconnecting/ in rocksdb.bulk_load_errors.2.err
TRUNCATE TABLE t1;
SET rocksdb_bulk_load_allow_unsorted=1;
SET rocksdb_bulk_load=1;
@ -82,6 +85,7 @@ Warning 1292 Truncated incorrect table_open_cache value: '0'
INSERT INTO t1 VALUES(51479+0.333333333,1);
DROP TABLE t1;
SET @@global.table_open_cache=@orig_table_open_cache;
FOUND 1 /RocksDB: Error [0-9]+ finalizing bulk load while closing handler/ in rocksdb.bulk_load_errors.3.err
CREATE TABLE t1 (pk INT, PRIMARY KEY (pk)) ENGINE=ROCKSDB;
CREATE TABLE t2 (pk INT, PRIMARY KEY (pk)) ENGINE=ROCKSDB;
SET rocksdb_bulk_load=1;

View file

@ -33,13 +33,10 @@ SET rocksdb_bulk_load=0;
SHOW VARIABLES LIKE 'rocksdb_bulk_load';
call mtr.add_suppression('finalizing last SST file while setting bulk loading variable');
--echo #
--echo # Despite the error, bulk load operation is over so the variable value
--echo # will be 0:
SELECT * FROM t1;
--let SEARCH_FILE=$LOG1
--let SEARCH_PATTERN=RocksDB: Error 198 finalizing last SST file while setting bulk loading variable
--let SEARCH_PATTERN=RocksDB: Error [0-9]+ finalizing last SST file while setting bulk loading variable
--source include/search_pattern_in_file.inc
--let LOG2=$MYSQLTEST_VARDIR/tmp/rocksdb.bulk_load_errors.2.err
@ -64,7 +61,7 @@ SELECT * FROM t1;
--source include/wait_until_count_sessions.inc
--let SEARCH_FILE=$LOG2
--let SEARCH_PATTERN=RocksDB: Error 198 finalizing last SST file while disconnecting
--let SEARCH_PATTERN=RocksDB: Error [0-9]+ finalizing last SST file while disconnecting
--source include/search_pattern_in_file.inc
--let LOG3=$MYSQLTEST_VARDIR/tmp/rocksdb.bulk_load_errors.3.err
@ -121,7 +118,7 @@ DROP TABLE t1;
SET @@global.table_open_cache=@orig_table_open_cache;
--let SEARCH_FILE=$LOG3
--let SEARCH_PATTERN=RocksDB: Error 198 finalizing bulk load while closing handler
--let SEARCH_PATTERN=RocksDB: Error [0-9]+ finalizing bulk load while closing handler
--source include/search_pattern_in_file.inc
--source include/restart_mysqld.inc