Commit 9826edb6 authored by Sergei Petrunia's avatar Sergei Petrunia

MariaRocks port: fix a few test result differences, part#2.

parent f23a0093
...@@ -3,7 +3,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY DEFAULT '0', a INT(11), b CHAR(8)) ENGINE=ro ...@@ -3,7 +3,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY DEFAULT '0', a INT(11), b CHAR(8)) ENGINE=ro
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL DEFAULT '0', `pk` int(11) NOT NULL DEFAULT 0,
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` char(8) DEFAULT NULL, `b` char(8) DEFAULT NULL,
PRIMARY KEY (`pk`) PRIMARY KEY (`pk`)
......
...@@ -18,22 +18,22 @@ pk col1 ...@@ -18,22 +18,22 @@ pk col1
3 3 3 3
set @tmp1=@@rocksdb_verify_checksums; set @tmp1=@@rocksdb_verify_checksums;
set rocksdb_verify_checksums=1; set rocksdb_verify_checksums=1;
set session debug= "+d,myrocks_simulate_bad_row_read1"; set session debug_dbug= "+d,myrocks_simulate_bad_row_read1";
select * from t1 where pk=1; select * from t1 where pk=1;
ERROR HY000: Got error 122 from storage engine ERROR HY000: Got error 122 "Internal (unspecified) error in handler" from storage engine ROCKSDB
set session debug= "-d,myrocks_simulate_bad_row_read1"; set session debug_dbug= "-d,myrocks_simulate_bad_row_read1";
set rocksdb_verify_checksums=@tmp1; set rocksdb_verify_checksums=@tmp1;
select * from t1 where pk=1; select * from t1 where pk=1;
pk col1 pk col1
1 1 1 1
set session debug= "+d,myrocks_simulate_bad_row_read2"; set session debug_dbug= "+d,myrocks_simulate_bad_row_read2";
select * from t1 where pk=1; select * from t1 where pk=1;
ERROR HY000: Got error 122 from storage engine ERROR HY000: Got error 122 "Internal (unspecified) error in handler" from storage engine ROCKSDB
set session debug= "-d,myrocks_simulate_bad_row_read2"; set session debug_dbug= "-d,myrocks_simulate_bad_row_read2";
set session debug= "+d,myrocks_simulate_bad_row_read3"; set session debug_dbug= "+d,myrocks_simulate_bad_row_read3";
select * from t1 where pk=1; select * from t1 where pk=1;
ERROR HY000: Got error 122 from storage engine ERROR HY000: Got error 122 "Internal (unspecified) error in handler" from storage engine ROCKSDB
set session debug= "-d,myrocks_simulate_bad_row_read3"; set session debug_dbug= "-d,myrocks_simulate_bad_row_read3";
insert into t1 values(4,'0123456789'); insert into t1 values(4,'0123456789');
select * from t1; select * from t1;
pk col1 pk col1
...@@ -54,10 +54,10 @@ insert into t2 values ('ABCD',1); ...@@ -54,10 +54,10 @@ insert into t2 values ('ABCD',1);
select * from t2; select * from t2;
pk col1 pk col1
ABCD 1 ABCD 1
set session debug= "+d,myrocks_simulate_bad_pk_read1"; set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1";
select * from t2; select * from t2;
ERROR HY000: Got error 122 from storage engine ERROR HY000: Got error 122 "Internal (unspecified) error in handler" from storage engine ROCKSDB
set session debug= "-d,myrocks_simulate_bad_pk_read1"; set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1";
drop table t2; drop table t2;
create table t2 ( create table t2 (
pk varchar(4) not null primary key, pk varchar(4) not null primary key,
...@@ -67,8 +67,8 @@ insert into t2 values ('ABCD',1); ...@@ -67,8 +67,8 @@ insert into t2 values ('ABCD',1);
select * from t2; select * from t2;
pk col1 pk col1
ABCD 1 ABCD 1
set session debug= "+d,myrocks_simulate_bad_pk_read1"; set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1";
select * from t2; select * from t2;
ERROR HY000: Got error 122 from storage engine ERROR HY000: Got error 122 "Internal (unspecified) error in handler" from storage engine ROCKSDB
set session debug= "-d,myrocks_simulate_bad_pk_read1"; set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1";
drop table t2; drop table t2;
connect con, localhost, root,,;
connection default;
set debug_sync='RESET'; set debug_sync='RESET';
drop table if exists t1; drop table if exists t1;
create table t1 (id1 int, id2 int, value int, primary key (id1, id2)) engine=rocksdb; create table t1 (id1 int, id2 int, value int, primary key (id1, id2)) engine=rocksdb;
insert into t1 values (1, 1, 1),(1, 2, 1),(1, 3, 1), (2, 2, 2); insert into t1 values (1, 1, 1),(1, 2, 1),(1, 3, 1), (2, 2, 2);
connection con;
set debug_sync='rocksdb.get_row_by_rowid SIGNAL parked WAIT_FOR go'; set debug_sync='rocksdb.get_row_by_rowid SIGNAL parked WAIT_FOR go';
update t1 set value=100 where id1=1; update t1 set value=100 where id1=1;
connection default;
set debug_sync='now WAIT_FOR parked'; set debug_sync='now WAIT_FOR parked';
delete from t1 where id1=1 and id2=1; delete from t1 where id1=1 and id2=1;
set debug_sync='now SIGNAL go'; set debug_sync='now SIGNAL go';
connection con;
select * from t1 where id1=1 for update; select * from t1 where id1=1 for update;
id1 id2 value id1 id2 value
1 2 100 1 2 100
1 3 100 1 3 100
connection default;
disconnect con;
set debug_sync='RESET'; set debug_sync='RESET';
drop table t1; drop table t1;
...@@ -6,7 +6,7 @@ INSERT INTO t2 (a,b) VALUES (1, 'bar'); ...@@ -6,7 +6,7 @@ INSERT INTO t2 (a,b) VALUES (1, 'bar');
CREATE TABLE t3 (a INT, b CHAR(8), pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=rocksdb CHARACTER SET utf8; CREATE TABLE t3 (a INT, b CHAR(8), pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=rocksdb CHARACTER SET utf8;
DESCRIBE t1; DESCRIBE t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
a int(11) NO PRI 0 a int(11) NO PRI NULL
b char(8) YES NULL b char(8) YES NULL
DESC t2 a; DESC t2 a;
Field Type Null Key Default Extra Field Type Null Key Default Extra
......
...@@ -29,7 +29,9 @@ Handler_read_key 1 ...@@ -29,7 +29,9 @@ Handler_read_key 1
Handler_read_last 0 Handler_read_last 0
Handler_read_next 0 Handler_read_next 0
Handler_read_prev 0 Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0 Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0 Handler_read_rnd_next 0
FLUSH STATUS; FLUSH STATUS;
SELECT * FROM t1 WHERE b=6; SELECT * FROM t1 WHERE b=6;
...@@ -42,7 +44,9 @@ Handler_read_key 1 ...@@ -42,7 +44,9 @@ Handler_read_key 1
Handler_read_last 0 Handler_read_last 0
Handler_read_next 1 Handler_read_next 1
Handler_read_prev 0 Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0 Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0 Handler_read_rnd_next 0
FLUSH STATUS; FLUSH STATUS;
SELECT * FROM t1; SELECT * FROM t1;
...@@ -63,7 +67,9 @@ Handler_read_key 0 ...@@ -63,7 +67,9 @@ Handler_read_key 0
Handler_read_last 0 Handler_read_last 0
Handler_read_next 0 Handler_read_next 0
Handler_read_prev 0 Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0 Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 10 Handler_read_rnd_next 10
FLUSH STATUS; FLUSH STATUS;
SELECT * FROM t1 WHERE b <=5 ORDER BY b; SELECT * FROM t1 WHERE b <=5 ORDER BY b;
...@@ -77,7 +83,9 @@ Handler_read_key 1 ...@@ -77,7 +83,9 @@ Handler_read_key 1
Handler_read_last 0 Handler_read_last 0
Handler_read_next 2 Handler_read_next 2
Handler_read_prev 0 Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0 Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0 Handler_read_rnd_next 0
FLUSH STATUS; FLUSH STATUS;
SELECT * FROM t1 WHERE id >=8 ORDER BY id; SELECT * FROM t1 WHERE id >=8 ORDER BY id;
...@@ -92,7 +100,9 @@ Handler_read_key 1 ...@@ -92,7 +100,9 @@ Handler_read_key 1
Handler_read_last 0 Handler_read_last 0
Handler_read_next 3 Handler_read_next 3
Handler_read_prev 0 Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0 Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0 Handler_read_rnd_next 0
FLUSH STATUS; FLUSH STATUS;
SELECT * FROM t1 WHERE id < 8 ORDER BY id; SELECT * FROM t1 WHERE id < 8 ORDER BY id;
...@@ -110,6 +120,8 @@ Handler_read_key 0 ...@@ -110,6 +120,8 @@ Handler_read_key 0
Handler_read_last 0 Handler_read_last 0
Handler_read_next 6 Handler_read_next 6
Handler_read_prev 0 Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0 Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0 Handler_read_rnd_next 0
DROP TABLE t1; DROP TABLE t1;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (i1 INT, PRIMARY KEY (i1)) ENGINE = ROCKSDB; CREATE TABLE t1 (i1 INT, PRIMARY KEY (i1)) ENGINE = ROCKSDB;
SET GLOBAL ROCKSDB_FORCE_FLUSH_MEMTABLE_NOW=1; SET GLOBAL ROCKSDB_FORCE_FLUSH_MEMTABLE_NOW=1;
set session debug= "+d,myrocks_simulate_negative_stats"; set session debug_dbug= "+d,myrocks_simulate_negative_stats";
SELECT CASE WHEN DATA_LENGTH < 1024 * 1024 THEN 'true' ELSE 'false' END FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; SELECT CASE WHEN DATA_LENGTH < 1024 * 1024 THEN 'true' ELSE 'false' END FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
CASE WHEN DATA_LENGTH < 1024 * 1024 THEN 'true' ELSE 'false' END CASE WHEN DATA_LENGTH < 1024 * 1024 THEN 'true' ELSE 'false' END
true true
set session debug= "-d,myrocks_simulate_negative_stats"; set session debug_dbug= "-d,myrocks_simulate_negative_stats";
DROP TABLE t1; DROP TABLE t1;
...@@ -49,7 +49,7 @@ t1 0 PRIMARY 1 pk A 1000 NULL NULL LSMTREE ...@@ -49,7 +49,7 @@ t1 0 PRIMARY 1 pk A 1000 NULL NULL LSMTREE
t1 1 b 1 b A 500 NULL NULL YES LSMTREE t1 1 b 1 b A 500 NULL NULL YES LSMTREE
EXPLAIN SELECT DISTINCT b FROM t1; EXPLAIN SELECT DISTINCT b FROM t1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL b 2 NULL # NULL 1 SIMPLE t1 index NULL b 2 NULL #
SELECT DISTINCT b FROM t1; SELECT DISTINCT b FROM t1;
b b
test1 test1
......
...@@ -9,7 +9,7 @@ SHOW COLUMNS IN t1; ...@@ -9,7 +9,7 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
a set('') YES NULL a set('') YES NULL
b set('test1','test2','test3','test4','test5') YES NULL b set('test1','test2','test3','test4','test5') YES NULL
c set('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') NO PRI c set('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') NO PRI NULL
INSERT INTO t1 (a,b,c) VALUES INSERT INTO t1 (a,b,c) VALUES
('','test2,test3','01,34,44,,23'), ('','test2,test3','01,34,44,,23'),
('',5,2), ('',5,2),
...@@ -38,7 +38,7 @@ SHOW COLUMNS IN t1; ...@@ -38,7 +38,7 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
a set('') YES NULL a set('') YES NULL
b set('test1','test2','test3','test4','test5') YES NULL b set('test1','test2','test3','test4','test5') YES NULL
c set('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') NO PRI c set('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') NO PRI NULL
e set('a','A') YES NULL e set('a','A') YES NULL
ALTER TABLE t1 ADD COLUMN f SET('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' ','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i') ; ALTER TABLE t1 ADD COLUMN f SET('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' ','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i') ;
ERROR HY000: Too many strings for column f and SET ERROR HY000: Too many strings for column f and SET
......
...@@ -23,23 +23,23 @@ select * from t1; ...@@ -23,23 +23,23 @@ select * from t1;
set @tmp1=@@rocksdb_verify_checksums; set @tmp1=@@rocksdb_verify_checksums;
set rocksdb_verify_checksums=1; set rocksdb_verify_checksums=1;
set session debug= "+d,myrocks_simulate_bad_row_read1"; set session debug_dbug= "+d,myrocks_simulate_bad_row_read1";
--error ER_GET_ERRNO --error ER_GET_ERRNO
select * from t1 where pk=1; select * from t1 where pk=1;
set session debug= "-d,myrocks_simulate_bad_row_read1"; set session debug_dbug= "-d,myrocks_simulate_bad_row_read1";
set rocksdb_verify_checksums=@tmp1; set rocksdb_verify_checksums=@tmp1;
select * from t1 where pk=1; select * from t1 where pk=1;
set session debug= "+d,myrocks_simulate_bad_row_read2"; set session debug_dbug= "+d,myrocks_simulate_bad_row_read2";
--error ER_GET_ERRNO --error ER_GET_ERRNO
select * from t1 where pk=1; select * from t1 where pk=1;
set session debug= "-d,myrocks_simulate_bad_row_read2"; set session debug_dbug= "-d,myrocks_simulate_bad_row_read2";
set session debug= "+d,myrocks_simulate_bad_row_read3"; set session debug_dbug= "+d,myrocks_simulate_bad_row_read3";
--error ER_GET_ERRNO --error ER_GET_ERRNO
select * from t1 where pk=1; select * from t1 where pk=1;
set session debug= "-d,myrocks_simulate_bad_row_read3"; set session debug_dbug= "-d,myrocks_simulate_bad_row_read3";
insert into t1 values(4,'0123456789'); insert into t1 values(4,'0123456789');
select * from t1; select * from t1;
...@@ -57,10 +57,10 @@ create table t2 ( ...@@ -57,10 +57,10 @@ create table t2 (
insert into t2 values ('ABCD',1); insert into t2 values ('ABCD',1);
select * from t2; select * from t2;
set session debug= "+d,myrocks_simulate_bad_pk_read1"; set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1";
--error ER_GET_ERRNO --error ER_GET_ERRNO
select * from t2; select * from t2;
set session debug= "-d,myrocks_simulate_bad_pk_read1"; set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1";
drop table t2; drop table t2;
...@@ -72,9 +72,9 @@ create table t2 ( ...@@ -72,9 +72,9 @@ create table t2 (
insert into t2 values ('ABCD',1); insert into t2 values ('ABCD',1);
select * from t2; select * from t2;
set session debug= "+d,myrocks_simulate_bad_pk_read1"; set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1";
--error ER_GET_ERRNO --error ER_GET_ERRNO
select * from t2; select * from t2;
set session debug= "-d,myrocks_simulate_bad_pk_read1"; set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1";
drop table t2; drop table t2;
...@@ -16,7 +16,7 @@ CREATE TABLE t2 (id1 INT, id2 INT, id3 INT, ...@@ -16,7 +16,7 @@ CREATE TABLE t2 (id1 INT, id2 INT, id3 INT,
UNIQUE KEY (id3, id1) COMMENT 'rev:cf') ENGINE=ROCKSDB; UNIQUE KEY (id3, id1) COMMENT 'rev:cf') ENGINE=ROCKSDB;
--source suite/rocksdb/include/dup_key_update.inc --source include/dup_key_update.inc
# Cleanup # Cleanup
DROP TABLE t1; DROP TABLE t1;
...@@ -34,7 +34,7 @@ CREATE TABLE t2 (id1 varchar(128) CHARACTER SET latin1 COLLATE latin1_bin, ...@@ -34,7 +34,7 @@ CREATE TABLE t2 (id1 varchar(128) CHARACTER SET latin1 COLLATE latin1_bin,
PRIMARY KEY (id1, id2, id3), PRIMARY KEY (id1, id2, id3),
UNIQUE KEY (id3, id1) COMMENT 'rev:cf') ENGINE=ROCKSDB; UNIQUE KEY (id3, id1) COMMENT 'rev:cf') ENGINE=ROCKSDB;
--source suite/rocksdb/include/dup_key_update.inc --source include/dup_key_update.inc
# Cleanup # Cleanup
DROP TABLE t1; DROP TABLE t1;
......
--source include/have_rocksdb.inc --source include/have_rocksdb.inc
--source include/have_partition.inc
# #
# Create tables with partitions and try to generate an error while creating # Create tables with partitions and try to generate an error while creating
......
...@@ -19,8 +19,8 @@ while ($i <= $max) { ...@@ -19,8 +19,8 @@ while ($i <= $max) {
SET GLOBAL ROCKSDB_FORCE_FLUSH_MEMTABLE_NOW=1; SET GLOBAL ROCKSDB_FORCE_FLUSH_MEMTABLE_NOW=1;
set session debug= "+d,myrocks_simulate_negative_stats"; set session debug_dbug= "+d,myrocks_simulate_negative_stats";
SELECT CASE WHEN DATA_LENGTH < 1024 * 1024 THEN 'true' ELSE 'false' END FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; SELECT CASE WHEN DATA_LENGTH < 1024 * 1024 THEN 'true' ELSE 'false' END FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
set session debug= "-d,myrocks_simulate_negative_stats"; set session debug_dbug= "-d,myrocks_simulate_negative_stats";
DROP TABLE t1; DROP TABLE t1;
...@@ -9,16 +9,16 @@ ...@@ -9,16 +9,16 @@
let $order=ASC; let $order=ASC;
let $comment=""; let $comment="";
--source suite/rocksdb/include/rocksdb_concurrent_delete.inc --source include/rocksdb_concurrent_delete.inc
let $order=DESC; let $order=DESC;
let $comment=""; let $comment="";
--source suite/rocksdb/include/rocksdb_concurrent_delete.inc --source include/rocksdb_concurrent_delete.inc
let $order=ASC; let $order=ASC;
let $comment="rev:cf2"; let $comment="rev:cf2";
--source suite/rocksdb/include/rocksdb_concurrent_delete.inc --source include/rocksdb_concurrent_delete.inc
let $order=DESC; let $order=DESC;
let $comment="rev:cf2"; let $comment="rev:cf2";
--source suite/rocksdb/include/rocksdb_concurrent_delete.inc --source include/rocksdb_concurrent_delete.inc
--source include/have_rocksdb.inc --source include/have_rocksdb.inc
--source include/have_partition.inc
# #
# Validate that the server starts when everything is okay, but detects errors # Validate that the server starts when everything is okay, but detects errors
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment