Skip to content

Commit 16a99c5

Browse files
committed
MariaRocks tests: various cleanups
remove hard-coded paths (that assumed we're in a source tree) remove various shell/perl/awk/whatsnot scripts, use mysqltest and perl remove numerous --exec /some/unix/tool commands, use mysqltest and perl
1 parent b2865a4 commit 16a99c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+449
-567
lines changed

storage/rocksdb/mysql-test/rocksdb/optimize_table_check_sst.pl

Lines changed: 0 additions & 22 deletions
This file was deleted.

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

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,42 @@ CREATE PROCEDURE bloom_end()
77
BEGIN
88
select case when variable_value-@c > 0 then 'true' else 'false' end as checked from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
99
END//
10-
drop table if exists t1;
11-
Warnings:
12-
Note 1051 Unknown table 'test.t1'
13-
drop table if exists t2;
14-
Warnings:
15-
Note 1051 Unknown table 'test.t2'
16-
create table t1 (
10+
create or replace table t1 (
1711
id1 bigint not null,
1812
id2 bigint not null,
1913
id3 varchar(100) not null,
2014
id4 int not null,
2115
id5 int not null,
2216
value bigint,
2317
value2 varchar(100),
24-
primary key (id1, id2, id3, id4),
25-
index id2 (id2),
26-
index id2_id1 (id2, id1),
27-
index id2_id3 (id2, id3),
28-
index id2_id4 (id2, id4),
29-
index id2_id3_id1_id4 (id2, id3, id1, id4),
30-
index id3_id2 (id3, id2)
18+
primary key (id1, id2, id3, id4) ,
19+
index id2 (id2) ,
20+
index id2_id1 (id2, id1) ,
21+
index id2_id3 (id2, id3) ,
22+
index id2_id4 (id2, id4) ,
23+
index id2_id3_id1_id4 (id2, id3, id1, id4) ,
24+
index id3_id2 (id3, id2)
3125
) engine=ROCKSDB;
32-
create table t2 (
26+
create or replace table t2 (
3327
id1 bigint not null,
3428
id2 bigint not null,
3529
id3 varchar(100) not null,
3630
id4 int not null,
3731
id5 int not null,
3832
value bigint,
3933
value2 varchar(100),
40-
primary key (id4),
41-
index id2 (id2),
42-
index id2_id3 (id2, id3),
43-
index id2_id4 (id2, id4),
44-
index id2_id4_id5 (id2, id4, id5),
45-
index id3_id4 (id3, id4),
46-
index id3_id5 (id3, id5)
34+
primary key (id4) ,
35+
index id2 (id2) ,
36+
index id2_id3 (id2, id3) ,
37+
index id2_id4 (id2, id4) ,
38+
index id2_id4_id5 (id2, id4, id5) ,
39+
index id3_id4 (id3, id4) ,
40+
index id3_id5 (id3, id5)
4741
) engine=ROCKSDB;
42+
insert t1
43+
select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc"
44+
from seq_1_to_10000;
45+
insert t2 select * from t1;
4846
call bloom_start();
4947
select count(*) from t1;
5048
count(*)
@@ -409,9 +407,7 @@ count(*)
409407
call bloom_end();
410408
checked
411409
false
412-
drop table if exists t1;
413-
drop table if exists t2;
414-
create table t1 (
410+
create or replace table t1 (
415411
id1 bigint not null,
416412
id2 bigint not null,
417413
id3 varchar(100) not null,
@@ -427,7 +423,7 @@ index id2_id4 (id2, id4) COMMENT 'cf_short_prefix',
427423
index id2_id3_id1_id4 (id2, id3, id1, id4) COMMENT 'cf_short_prefix',
428424
index id3_id2 (id3, id2) COMMENT 'cf_short_prefix'
429425
) engine=ROCKSDB;
430-
create table t2 (
426+
create or replace table t2 (
431427
id1 bigint not null,
432428
id2 bigint not null,
433429
id3 varchar(100) not null,
@@ -443,6 +439,10 @@ index id2_id4_id5 (id2, id4, id5) COMMENT 'cf_short_prefix',
443439
index id3_id4 (id3, id4) COMMENT 'cf_short_prefix',
444440
index id3_id5 (id3, id5) COMMENT 'cf_short_prefix'
445441
) engine=ROCKSDB;
442+
insert t1
443+
select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc"
444+
from seq_1_to_10000;
445+
insert t2 select * from t1;
446446
call bloom_start();
447447
select count(*) from t1;
448448
count(*)
@@ -807,9 +807,7 @@ count(*)
807807
call bloom_end();
808808
checked
809809
true
810-
drop table if exists t1;
811-
drop table if exists t2;
812-
create table t1 (
810+
create or replace table t1 (
813811
id1 bigint not null,
814812
id2 bigint not null,
815813
id3 varchar(100) not null,
@@ -825,7 +823,7 @@ index id2_id4 (id2, id4) COMMENT 'cf_long_prefix',
825823
index id2_id3_id1_id4 (id2, id3, id1, id4) COMMENT 'cf_long_prefix',
826824
index id3_id2 (id3, id2) COMMENT 'cf_long_prefix'
827825
) engine=ROCKSDB;
828-
create table t2 (
826+
create or replace table t2 (
829827
id1 bigint not null,
830828
id2 bigint not null,
831829
id3 varchar(100) not null,
@@ -841,6 +839,10 @@ index id2_id4_id5 (id2, id4, id5) COMMENT 'cf_long_prefix',
841839
index id3_id4 (id3, id4) COMMENT 'cf_long_prefix',
842840
index id3_id5 (id3, id5) COMMENT 'cf_long_prefix'
843841
) engine=ROCKSDB;
842+
insert t1
843+
select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc"
844+
from seq_1_to_10000;
845+
insert t2 select * from t1;
844846
call bloom_start();
845847
select count(*) from t1;
846848
count(*)

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

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,42 @@ CREATE PROCEDURE bloom_end()
77
BEGIN
88
select case when variable_value-@c > 0 then 'true' else 'false' end as checked from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
99
END//
10-
drop table if exists t1;
11-
Warnings:
12-
Note 1051 Unknown table 'test.t1'
13-
drop table if exists t2;
14-
Warnings:
15-
Note 1051 Unknown table 'test.t2'
16-
create table t1 (
10+
create or replace table t1 (
1711
id1 bigint not null,
1812
id2 bigint not null,
1913
id3 varchar(100) not null,
2014
id4 int not null,
2115
id5 int not null,
2216
value bigint,
2317
value2 varchar(100),
24-
primary key (id1, id2, id3, id4),
25-
index id2 (id2),
26-
index id2_id1 (id2, id1),
27-
index id2_id3 (id2, id3),
28-
index id2_id4 (id2, id4),
29-
index id2_id3_id1_id4 (id2, id3, id1, id4),
30-
index id3_id2 (id3, id2)
18+
primary key (id1, id2, id3, id4) ,
19+
index id2 (id2) ,
20+
index id2_id1 (id2, id1) ,
21+
index id2_id3 (id2, id3) ,
22+
index id2_id4 (id2, id4) ,
23+
index id2_id3_id1_id4 (id2, id3, id1, id4) ,
24+
index id3_id2 (id3, id2)
3125
) engine=ROCKSDB;
32-
create table t2 (
26+
create or replace table t2 (
3327
id1 bigint not null,
3428
id2 bigint not null,
3529
id3 varchar(100) not null,
3630
id4 int not null,
3731
id5 int not null,
3832
value bigint,
3933
value2 varchar(100),
40-
primary key (id4),
41-
index id2 (id2),
42-
index id2_id3 (id2, id3),
43-
index id2_id4 (id2, id4),
44-
index id2_id4_id5 (id2, id4, id5),
45-
index id3_id4 (id3, id4),
46-
index id3_id5 (id3, id5)
34+
primary key (id4) ,
35+
index id2 (id2) ,
36+
index id2_id3 (id2, id3) ,
37+
index id2_id4 (id2, id4) ,
38+
index id2_id4_id5 (id2, id4, id5) ,
39+
index id3_id4 (id3, id4) ,
40+
index id3_id5 (id3, id5)
4741
) engine=ROCKSDB;
42+
insert t1
43+
select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc"
44+
from seq_1_to_10000;
45+
insert t2 select * from t1;
4846
call bloom_start();
4947
select count(*) from t1;
5048
count(*)
@@ -409,9 +407,7 @@ count(*)
409407
call bloom_end();
410408
checked
411409
false
412-
drop table if exists t1;
413-
drop table if exists t2;
414-
create table t1 (
410+
create or replace table t1 (
415411
id1 bigint not null,
416412
id2 bigint not null,
417413
id3 varchar(100) not null,
@@ -427,7 +423,7 @@ index id2_id4 (id2, id4) COMMENT 'cf_short_prefix',
427423
index id2_id3_id1_id4 (id2, id3, id1, id4) COMMENT 'cf_short_prefix',
428424
index id3_id2 (id3, id2) COMMENT 'cf_short_prefix'
429425
) engine=ROCKSDB;
430-
create table t2 (
426+
create or replace table t2 (
431427
id1 bigint not null,
432428
id2 bigint not null,
433429
id3 varchar(100) not null,
@@ -443,6 +439,10 @@ index id2_id4_id5 (id2, id4, id5) COMMENT 'cf_short_prefix',
443439
index id3_id4 (id3, id4) COMMENT 'cf_short_prefix',
444440
index id3_id5 (id3, id5) COMMENT 'cf_short_prefix'
445441
) engine=ROCKSDB;
442+
insert t1
443+
select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc"
444+
from seq_1_to_10000;
445+
insert t2 select * from t1;
446446
call bloom_start();
447447
select count(*) from t1;
448448
count(*)
@@ -807,9 +807,7 @@ count(*)
807807
call bloom_end();
808808
checked
809809
false
810-
drop table if exists t1;
811-
drop table if exists t2;
812-
create table t1 (
810+
create or replace table t1 (
813811
id1 bigint not null,
814812
id2 bigint not null,
815813
id3 varchar(100) not null,
@@ -825,7 +823,7 @@ index id2_id4 (id2, id4) COMMENT 'cf_long_prefix',
825823
index id2_id3_id1_id4 (id2, id3, id1, id4) COMMENT 'cf_long_prefix',
826824
index id3_id2 (id3, id2) COMMENT 'cf_long_prefix'
827825
) engine=ROCKSDB;
828-
create table t2 (
826+
create or replace table t2 (
829827
id1 bigint not null,
830828
id2 bigint not null,
831829
id3 varchar(100) not null,
@@ -841,6 +839,10 @@ index id2_id4_id5 (id2, id4, id5) COMMENT 'cf_long_prefix',
841839
index id3_id4 (id3, id4) COMMENT 'cf_long_prefix',
842840
index id3_id5 (id3, id5) COMMENT 'cf_long_prefix'
843841
) engine=ROCKSDB;
842+
insert t1
843+
select (seq+9) div 10, (seq+4) div 5, (seq+4) div 5, seq, seq, 1000, "aaabbbccc"
844+
from seq_1_to_10000;
845+
insert t2 select * from t1;
844846
call bloom_start();
845847
select count(*) from t1;
846848
count(*)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ ALTER TABLE t2 ADD INDEX(value);
107107
ERROR HY000: Unsupported collation on string indexed column test.t2.value Use binary collation (latin1_bin, binary, utf8_bin).
108108
DROP TABLE t2;
109109
SET GLOBAL rocksdb_strict_collation_exceptions="[a-b";
110-
Invalid pattern in strict_collation_exceptions: [a-b
110+
FOUND 1 /Invalid pattern in strict_collation_exceptions: \[a-b/ in mysqld.1.err
111111
CREATE TABLE a (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8;
112112
ERROR HY000: Unsupported collation on string indexed column test.a.value Use binary collation (latin1_bin, binary, utf8_bin).
113113
SET GLOBAL rocksdb_strict_collation_exceptions="[a-b]";
@@ -118,7 +118,7 @@ ERROR HY000: Unsupported collation on string indexed column test.c.value Use bin
118118
DROP TABLE a, b;
119119
call mtr.add_suppression("Invalid pattern in strict_collation_exceptions:");
120120
SET GLOBAL rocksdb_strict_collation_exceptions="abc\\";
121-
Invalid pattern in strict_collation_exceptions: abc\
121+
FOUND 1 /Invalid pattern in strict_collation_exceptions: abc/ in mysqld.1.err
122122
CREATE TABLE abc (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8;
123123
ERROR HY000: Unsupported collation on string indexed column test.abc.value Use binary collation (latin1_bin, binary, utf8_bin).
124124
SET GLOBAL rocksdb_strict_collation_exceptions="abc";

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ set global rocksdb_compaction_sequential_deletes_window=0;
2222
set global rocksdb_compaction_sequential_deletes= 0;
2323
set global rocksdb_compaction_sequential_deletes_file_size=0;
2424
set global rocksdb_force_flush_memtable_now=1;
25-
select sleep(1);
26-
sleep(1)
27-
0
2825
wait_for_delete: 0
2926
There are deletes left
3027
SET GLOBAL rocksdb_compaction_sequential_deletes= 0;
@@ -36,9 +33,6 @@ set global rocksdb_compaction_sequential_deletes_window=1000;
3633
set global rocksdb_compaction_sequential_deletes= 990;
3734
set global rocksdb_compaction_sequential_deletes_file_size=0;
3835
set global rocksdb_force_flush_memtable_now=1;
39-
select sleep(1);
40-
sleep(1)
41-
0
4236
wait_for_delete: 1
4337
No more deletes left
4438
SET GLOBAL rocksdb_compaction_sequential_deletes= 0;
@@ -50,9 +44,6 @@ set global rocksdb_compaction_sequential_deletes_window=1000;
5044
set global rocksdb_compaction_sequential_deletes= 1000;
5145
set global rocksdb_compaction_sequential_deletes_file_size=1000000;
5246
set global rocksdb_force_flush_memtable_now=1;
53-
select sleep(1);
54-
sleep(1)
55-
0
5647
wait_for_delete: 0
5748
There are deletes left
5849
SET GLOBAL rocksdb_compaction_sequential_deletes= 0;
@@ -64,9 +55,6 @@ set global rocksdb_compaction_sequential_deletes_window=1000;
6455
set global rocksdb_compaction_sequential_deletes= 50;
6556
set global rocksdb_compaction_sequential_deletes_file_size=0;
6657
set global rocksdb_force_flush_memtable_now=1;
67-
select sleep(1);
68-
sleep(1)
69-
0
7058
wait_for_delete: 1
7159
No more deletes left
7260
SET GLOBAL rocksdb_compaction_sequential_deletes= 0;
@@ -81,9 +69,6 @@ set global rocksdb_compaction_sequential_deletes_window=1000;
8169
set global rocksdb_compaction_sequential_deletes= 50;
8270
set global rocksdb_compaction_sequential_deletes_file_size=0;
8371
set global rocksdb_force_flush_memtable_now=1;
84-
select sleep(1);
85-
sleep(1)
86-
0
8772
wait_for_delete: 1
8873
No more deletes left
8974
SET GLOBAL rocksdb_compaction_sequential_deletes= 0;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
call mtr.add_suppression("Column family 'cf1' not found");
2+
call mtr.add_suppression("Column family 'rev:cf2' not found");
13
DROP TABLE IF EXISTS t1;
24
DROP TABLE IF EXISTS t2;
35
DROP TABLE IF EXISTS t3;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
call mtr.add_suppression("Column family 'cf1' not found");
2+
call mtr.add_suppression("Column family 'rev:cf2' not found");
13
DROP TABLE IF EXISTS t1;
24
DROP TABLE IF EXISTS t2;
35
DROP TABLE IF EXISTS t3;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
call mtr.add_suppression("Column family 'cf1' not found");
2+
call mtr.add_suppression("Column family 'rev:cf2' not found");
13
DROP TABLE IF EXISTS t1;
24
set global rocksdb_compact_cf = 'cf1';
35
set global rocksdb_compact_cf = 'rev:cf2';

0 commit comments

Comments
 (0)