Skip to content

Commit a42b900

Browse files
committed
MariaRocks port: more of testcase Maria-fication
- Adjust paths to MyRocks tests - s/@@dbug/@@debug_dbug/ - etc
1 parent ece3ab3 commit a42b900

File tree

8 files changed

+42
-26
lines changed

8 files changed

+42
-26
lines changed

storage/rocksdb/mysql-test/rocksdb/r/rocksdb_checksums.result

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ insert into mtr.test_suppressions values
6464
('Checksum mismatch in value of key-value pair for index'),
6565
('Data with incorrect checksum');
6666
# 1. Start with mismatch in key checksum of the PK.
67-
set session debug= "+d,myrocks_simulate_bad_pk_checksum1";
67+
set session debug_dbug= "+d,myrocks_simulate_bad_pk_checksum1";
6868
set session rocksdb_verify_checksums=off;
6969
select * from t3;
7070
pk a b
@@ -76,9 +76,9 @@ select * from t3;
7676
ERROR HY000: Internal error: Record checksum mismatch
7777
select * from t4;
7878
ERROR HY000: Internal error: Record checksum mismatch
79-
set session debug= "-d,myrocks_simulate_bad_pk_checksum1";
79+
set session debug_dbug= "-d,myrocks_simulate_bad_pk_checksum1";
8080
# 2. Continue with mismatch in pk value checksum.
81-
set session debug= "+d,myrocks_simulate_bad_pk_checksum2";
81+
set session debug_dbug= "+d,myrocks_simulate_bad_pk_checksum2";
8282
set session rocksdb_verify_checksums=off;
8383
select * from t3;
8484
pk a b
@@ -90,7 +90,7 @@ select * from t3;
9090
ERROR HY000: Internal error: Record checksum mismatch
9191
select * from t4;
9292
ERROR HY000: Internal error: Record checksum mismatch
93-
set session debug= "-d,myrocks_simulate_bad_pk_checksum2";
93+
set session debug_dbug= "-d,myrocks_simulate_bad_pk_checksum2";
9494
# 3. Check if we catch checksum mismatches for secondary indexes
9595
explain
9696
select * from t3 force index(a) where a<4;
@@ -101,12 +101,12 @@ pk a b
101101
1 1 1
102102
2 2 3
103103
3 3 3
104-
set session debug= "+d,myrocks_simulate_bad_key_checksum1";
104+
set session debug_dbug= "+d,myrocks_simulate_bad_key_checksum1";
105105
select * from t3 force index(a) where a<4;
106106
ERROR HY000: Internal error: Record checksum mismatch
107107
select * from t4 force index(a) where a<1000000;
108108
ERROR HY000: Internal error: Record checksum mismatch
109-
set session debug= "-d,myrocks_simulate_bad_key_checksum1";
109+
set session debug_dbug= "-d,myrocks_simulate_bad_key_checksum1";
110110
# 4. The same for index-only reads?
111111
explain
112112
select a from t3 force index(a) where a<4;
@@ -117,12 +117,12 @@ a
117117
1
118118
2
119119
3
120-
set session debug= "+d,myrocks_simulate_bad_key_checksum1";
120+
set session debug_dbug= "+d,myrocks_simulate_bad_key_checksum1";
121121
select a from t3 force index(a) where a<4;
122122
ERROR HY000: Internal error: Record checksum mismatch
123123
select a from t4 force index(a) where a<1000000;
124124
ERROR HY000: Internal error: Record checksum mismatch
125-
set session debug= "-d,myrocks_simulate_bad_key_checksum1";
125+
set session debug_dbug= "-d,myrocks_simulate_bad_key_checksum1";
126126
set @@global.rocksdb_store_checksums=@save_rocksdb_store_checksums;
127127
set @@global.rocksdb_verify_checksums=@save_rocksdb_verify_checksums;
128128
set @@global.rocksdb_checksums_pct=@save_rocksdb_checksums_pct;

storage/rocksdb/mysql-test/rocksdb/r/unique_sec_rev_cf.result

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
DROP TABLE IF EXISTS t1;
2+
connect con1,localhost,root,,;
3+
connect con2,localhost,root,,;
4+
connection con1;
25
CREATE TABLE t1 (id1 INT NOT NULL, id2 INT NOT NULL, id3 VARCHAR(32),
36
id4 INT, id5 VARCHAR(32),
47
value1 INT, value2 INT, value3 VARCHAR(32),
@@ -67,8 +70,10 @@ ERROR 23000: Duplicate entry '10-10-10' for key 'id2_2'
6770
SELECT COUNT(*) FROM t1;
6871
COUNT(*)
6972
13
73+
connection con1;
7074
BEGIN;
7175
INSERT INTO t1 VALUES (30, 31, 32, 33, 34, 30, 30, 30);
76+
connection con2;
7277
BEGIN;
7378
SELECT COUNT(*) FROM t1;
7479
COUNT(*)
@@ -116,14 +121,19 @@ UPDATE t1 SET id5=34 WHERE id1=38;
116121
ERROR HY000: Lock wait timeout exceeded; try restarting transaction: Timeout on index: test.t1.id5
117122
# NULL values are unique
118123
UPDATE t1 SET id5=NULL WHERE value1 > 37;
124+
connection con1;
119125
COMMIT;
126+
connection con2;
120127
COMMIT;
128+
connection con2;
121129
BEGIN;
122130
SELECT COUNT(*) FROM t1;
123131
COUNT(*)
124132
17
133+
connection con1;
125134
BEGIN;
126135
INSERT INTO t1 VALUES (40, 40, 40, 40, 40, 40, 40, 40);
136+
connection con2;
127137
# When transaction is pending, fail on lock acquisition
128138
INSERT INTO t1 VALUES (40, 40, 40, 40, 40, 40, 40, 40);
129139
ERROR HY000: Lock wait timeout exceeded; try restarting transaction: Timeout on index: test.t1.PRIMARY
@@ -132,7 +142,9 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction: Timeout on
132142
SELECT COUNT(*) FROM t1;
133143
COUNT(*)
134144
17
145+
connection con1;
135146
COMMIT;
147+
connection con2;
136148
# When transaction is committed, fail on duplicate key
137149
INSERT INTO t1 VALUES (40, 40, 40, 40, 40, 40, 40, 40);
138150
Got one of the listed errors
@@ -159,4 +171,7 @@ id1 id2 id3 id4 id5 value1 value2 value3
159171
3 3 3 3 3 4 1 1
160172
2 2 2 2 2 3 1 1
161173
1 1 1 1 1 2 0 0
174+
disconnect con1;
175+
disconnect con2;
176+
connection default;
162177
DROP TABLE t1;

storage/rocksdb/mysql-test/rocksdb/t/bloomfilter.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--source include/have_rocksdb.inc
22

3-
let tmpl_ddl= suite/rocksdb/t/bloomfilter_table_def.tmpl;
3+
let tmpl_ddl= ../storage/rocksdb/mysql-test/rocksdb/t/bloomfilter_table_def.tmpl;
44
let ddl= $MYSQL_TMP_DIR/bloomfilter_create.sql;
55

66
DELIMITER //;
@@ -19,18 +19,18 @@ DELIMITER ;//
1919
#BF is sometimes invoked and useful
2020
--exec sed s/##CF##//g $tmpl_ddl > $ddl
2121
--source $ddl
22-
--source suite/rocksdb/t/bloomfilter_load_select.inc
22+
--source t/bloomfilter_load_select.inc
2323

2424
#BF is always invoked but not useful at all
2525
--exec sed s/##CF##/" COMMENT 'cf_short_prefix'"/g $tmpl_ddl > $ddl
2626
--source $ddl
27-
--source suite/rocksdb/t/bloomfilter_load_select.inc
27+
--source t/bloomfilter_load_select.inc
2828

2929

3030
#BF is most of the time invoked and useful
3131
--exec sed s/##CF##/" COMMENT 'cf_long_prefix'"/g $tmpl_ddl > $ddl
3232
--source $ddl
33-
--source suite/rocksdb/t/bloomfilter_load_select.inc
33+
--source t/bloomfilter_load_select.inc
3434

3535
# BUG: Prev() with prefix lookup should not use prefix bloom filter
3636
create table r1 (id1 bigint, id2 bigint, id3 bigint, v1 int, v2 text, primary key (id1, id2, id3)) engine=rocksdb DEFAULT CHARSET=latin1 collate latin1_bin;

storage/rocksdb/mysql-test/rocksdb/t/bloomfilter_load_select.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# loading some data (larger than write buf size) to cause compaction
2-
--exec perl suite/rocksdb/t/gen_insert.pl t1 > $MYSQL_TMP_DIR/insert_t1.sql
3-
--exec perl suite/rocksdb/t/gen_insert.pl t2 > $MYSQL_TMP_DIR/insert_t2.sql
2+
--exec perl ../storage/rocksdb/mysql-test/rocksdb/t/gen_insert.pl t1 > $MYSQL_TMP_DIR/insert_t1.sql
3+
--exec perl ../storage/rocksdb/mysql-test/rocksdb/t/gen_insert.pl t2 > $MYSQL_TMP_DIR/insert_t2.sql
44
--disable_query_log
55
--source $MYSQL_TMP_DIR/insert_t1.sql
66
--source $MYSQL_TMP_DIR/insert_t2.sql

storage/rocksdb/mysql-test/rocksdb/t/compact_deletes_test.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ let $wait_condition = select count(*) = 0
3737
--source include/wait_condition.inc
3838
--enable_query_log
3939

40-
--exec bash suite/rocksdb/t/sst_count_rows.sh $MYSQLTEST_VARDIR $MYSQL_SST_DUMP $no_more_deletes
40+
let $MYSQL_SST_DUMP=../storage/rocksdb/sst_dump
41+
--exec bash ../storage/rocksdb/mysql-test/rocksdb/t/sst_count_rows.sh $MYSQLTEST_VARDIR $MYSQL_SST_DUMP $no_more_deletes
4142
eval SET GLOBAL rocksdb_compaction_sequential_deletes= $save_rocksdb_compaction_sequential_deletes;
4243
eval SET GLOBAL rocksdb_compaction_sequential_deletes_file_size= $save_rocksdb_compaction_sequential_deletes_file_size;
4344
eval SET GLOBAL rocksdb_compaction_sequential_deletes_window= $save_rocksdb_compaction_sequential_deletes_window;

storage/rocksdb/mysql-test/rocksdb/t/drop_table2.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,6 @@ let $wait_condition = select count(*) = 0
105105

106106
# Check that space is reclaimed
107107
--exec du -c $MYSQLTEST_VARDIR/mysqld.1/data/.rocksdb/*.sst |grep total |sed 's/[\t]total/ after/' >> $output
108-
--exec perl suite/rocksdb/t/drop_table2_check.pl $output
108+
--exec perl ../storage/rocksdb/mysql-test/rocksdb/t/drop_table2_check.pl $output
109109

110110
# Cleanup

storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.test

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ while ($i<10000)
5757
--enable_query_log
5858
check table t4;
5959
--exec grep "^[0-9-]* [0-9:]* [0-9]* \[Note\] CHECKTABLE t4" $MYSQLTEST_VARDIR/log/mysqld.1.err | cut -d] -f2 > $MYSQL_TMP_DIR/rocksdb_checksums.log
60-
--exec perl suite/rocksdb/t/rocksdb_checksums.pl $MYSQL_TMP_DIR/rocksdb_checksums.log 10000 5
60+
--exec perl ../storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.pl $MYSQL_TMP_DIR/rocksdb_checksums.log 10000 5
6161
--remove_file $MYSQL_TMP_DIR/rocksdb_checksums.log
6262
set session rocksdb_checksums_pct=100;
6363

@@ -70,52 +70,52 @@ insert into mtr.test_suppressions values
7070
('Data with incorrect checksum');
7171

7272
--echo # 1. Start with mismatch in key checksum of the PK.
73-
set session debug= "+d,myrocks_simulate_bad_pk_checksum1";
73+
set session debug_dbug= "+d,myrocks_simulate_bad_pk_checksum1";
7474
set session rocksdb_verify_checksums=off;
7575
select * from t3;
7676
set session rocksdb_verify_checksums=on;
7777
--error ER_INTERNAL_ERROR
7878
select * from t3;
7979
--error ER_INTERNAL_ERROR
8080
select * from t4;
81-
set session debug= "-d,myrocks_simulate_bad_pk_checksum1";
81+
set session debug_dbug= "-d,myrocks_simulate_bad_pk_checksum1";
8282

8383
--echo # 2. Continue with mismatch in pk value checksum.
84-
set session debug= "+d,myrocks_simulate_bad_pk_checksum2";
84+
set session debug_dbug= "+d,myrocks_simulate_bad_pk_checksum2";
8585
set session rocksdb_verify_checksums=off;
8686
select * from t3;
8787
set session rocksdb_verify_checksums=on;
8888
--error ER_INTERNAL_ERROR
8989
select * from t3;
9090
--error ER_INTERNAL_ERROR
9191
select * from t4;
92-
set session debug= "-d,myrocks_simulate_bad_pk_checksum2";
92+
set session debug_dbug= "-d,myrocks_simulate_bad_pk_checksum2";
9393

9494
--echo # 3. Check if we catch checksum mismatches for secondary indexes
9595
--replace_column 9 #
9696
explain
9797
select * from t3 force index(a) where a<4;
9898
select * from t3 force index(a) where a<4;
9999

100-
set session debug= "+d,myrocks_simulate_bad_key_checksum1";
100+
set session debug_dbug= "+d,myrocks_simulate_bad_key_checksum1";
101101
--error ER_INTERNAL_ERROR
102102
select * from t3 force index(a) where a<4;
103103
--error ER_INTERNAL_ERROR
104104
select * from t4 force index(a) where a<1000000;
105-
set session debug= "-d,myrocks_simulate_bad_key_checksum1";
105+
set session debug_dbug= "-d,myrocks_simulate_bad_key_checksum1";
106106

107107
--echo # 4. The same for index-only reads?
108108
--replace_column 9 #
109109
explain
110110
select a from t3 force index(a) where a<4;
111111
select a from t3 force index(a) where a<4;
112112

113-
set session debug= "+d,myrocks_simulate_bad_key_checksum1";
113+
set session debug_dbug= "+d,myrocks_simulate_bad_key_checksum1";
114114
--error ER_INTERNAL_ERROR
115115
select a from t3 force index(a) where a<4;
116116
--error ER_INTERNAL_ERROR
117117
select a from t4 force index(a) where a<1000000;
118-
set session debug= "-d,myrocks_simulate_bad_key_checksum1";
118+
set session debug_dbug= "-d,myrocks_simulate_bad_key_checksum1";
119119

120120
set @@global.rocksdb_store_checksums=@save_rocksdb_store_checksums;
121121
set @@global.rocksdb_verify_checksums=@save_rocksdb_verify_checksums;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--source include/have_rocksdb.inc
22

33
let ddl= $MYSQL_TMP_DIR/unique_sec_rev_cf.sql;
4-
--exec sed s/##CF##/" COMMENT 'rev:cf'"/g suite/rocksdb/t/unique_sec.inc > $ddl
4+
--exec sed s/##CF##/" COMMENT 'rev:cf'"/g ../storage/rocksdb/mysql-test/rocksdb/t/unique_sec.inc > $ddl
55
--source $ddl

0 commit comments

Comments
 (0)