Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a42b9003
Commit
a42b9003
authored
Nov 05, 2016
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MariaRocks port: more of testcase Maria-fication
- Adjust paths to MyRocks tests - s/@@dbug/@@debug_dbug/ - etc
parent
ece3ab37
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
26 deletions
+42
-26
storage/rocksdb/mysql-test/rocksdb/r/rocksdb_checksums.result
...age/rocksdb/mysql-test/rocksdb/r/rocksdb_checksums.result
+8
-8
storage/rocksdb/mysql-test/rocksdb/r/unique_sec_rev_cf.result
...age/rocksdb/mysql-test/rocksdb/r/unique_sec_rev_cf.result
+15
-0
storage/rocksdb/mysql-test/rocksdb/t/bloomfilter.inc
storage/rocksdb/mysql-test/rocksdb/t/bloomfilter.inc
+4
-4
storage/rocksdb/mysql-test/rocksdb/t/bloomfilter_load_select.inc
.../rocksdb/mysql-test/rocksdb/t/bloomfilter_load_select.inc
+2
-2
storage/rocksdb/mysql-test/rocksdb/t/compact_deletes_test.inc
...age/rocksdb/mysql-test/rocksdb/t/compact_deletes_test.inc
+2
-1
storage/rocksdb/mysql-test/rocksdb/t/drop_table2.test
storage/rocksdb/mysql-test/rocksdb/t/drop_table2.test
+1
-1
storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.test
storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.test
+9
-9
storage/rocksdb/mysql-test/rocksdb/t/unique_sec_rev_cf.test
storage/rocksdb/mysql-test/rocksdb/t/unique_sec_rev_cf.test
+1
-1
No files found.
storage/rocksdb/mysql-test/rocksdb/r/rocksdb_checksums.result
View file @
a42b9003
...
...
@@ -64,7 +64,7 @@ insert into mtr.test_suppressions values
('Checksum mismatch in value of key-value pair for index'),
('Data with incorrect checksum');
# 1. Start with mismatch in key checksum of the PK.
set session debug= "+d,myrocks_simulate_bad_pk_checksum1";
set session debug
_dbug
= "+d,myrocks_simulate_bad_pk_checksum1";
set session rocksdb_verify_checksums=off;
select * from t3;
pk a b
...
...
@@ -76,9 +76,9 @@ select * from t3;
ERROR HY000: Internal error: Record checksum mismatch
select * from t4;
ERROR HY000: Internal error: Record checksum mismatch
set session debug= "-d,myrocks_simulate_bad_pk_checksum1";
set session debug
_dbug
= "-d,myrocks_simulate_bad_pk_checksum1";
# 2. Continue with mismatch in pk value checksum.
set session debug= "+d,myrocks_simulate_bad_pk_checksum2";
set session debug
_dbug
= "+d,myrocks_simulate_bad_pk_checksum2";
set session rocksdb_verify_checksums=off;
select * from t3;
pk a b
...
...
@@ -90,7 +90,7 @@ select * from t3;
ERROR HY000: Internal error: Record checksum mismatch
select * from t4;
ERROR HY000: Internal error: Record checksum mismatch
set session debug= "-d,myrocks_simulate_bad_pk_checksum2";
set session debug
_dbug
= "-d,myrocks_simulate_bad_pk_checksum2";
# 3. Check if we catch checksum mismatches for secondary indexes
explain
select * from t3 force index(a) where a<4;
...
...
@@ -101,12 +101,12 @@ pk a b
1 1 1
2 2 3
3 3 3
set session debug= "+d,myrocks_simulate_bad_key_checksum1";
set session debug
_dbug
= "+d,myrocks_simulate_bad_key_checksum1";
select * from t3 force index(a) where a<4;
ERROR HY000: Internal error: Record checksum mismatch
select * from t4 force index(a) where a<1000000;
ERROR HY000: Internal error: Record checksum mismatch
set session debug= "-d,myrocks_simulate_bad_key_checksum1";
set session debug
_dbug
= "-d,myrocks_simulate_bad_key_checksum1";
# 4. The same for index-only reads?
explain
select a from t3 force index(a) where a<4;
...
...
@@ -117,12 +117,12 @@ a
1
2
3
set session debug= "+d,myrocks_simulate_bad_key_checksum1";
set session debug
_dbug
= "+d,myrocks_simulate_bad_key_checksum1";
select a from t3 force index(a) where a<4;
ERROR HY000: Internal error: Record checksum mismatch
select a from t4 force index(a) where a<1000000;
ERROR HY000: Internal error: Record checksum mismatch
set session debug= "-d,myrocks_simulate_bad_key_checksum1";
set session debug
_dbug
= "-d,myrocks_simulate_bad_key_checksum1";
set @@global.rocksdb_store_checksums=@save_rocksdb_store_checksums;
set @@global.rocksdb_verify_checksums=@save_rocksdb_verify_checksums;
set @@global.rocksdb_checksums_pct=@save_rocksdb_checksums_pct;
...
...
storage/rocksdb/mysql-test/rocksdb/r/unique_sec_rev_cf.result
View file @
a42b9003
DROP TABLE IF EXISTS t1;
connect con1,localhost,root,,;
connect con2,localhost,root,,;
connection con1;
CREATE TABLE t1 (id1 INT NOT NULL, id2 INT NOT NULL, id3 VARCHAR(32),
id4 INT, id5 VARCHAR(32),
value1 INT, value2 INT, value3 VARCHAR(32),
...
...
@@ -67,8 +70,10 @@ ERROR 23000: Duplicate entry '10-10-10' for key 'id2_2'
SELECT COUNT(*) FROM t1;
COUNT(*)
13
connection con1;
BEGIN;
INSERT INTO t1 VALUES (30, 31, 32, 33, 34, 30, 30, 30);
connection con2;
BEGIN;
SELECT COUNT(*) FROM t1;
COUNT(*)
...
...
@@ -116,14 +121,19 @@ UPDATE t1 SET id5=34 WHERE id1=38;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction: Timeout on index: test.t1.id5
# NULL values are unique
UPDATE t1 SET id5=NULL WHERE value1 > 37;
connection con1;
COMMIT;
connection con2;
COMMIT;
connection con2;
BEGIN;
SELECT COUNT(*) FROM t1;
COUNT(*)
17
connection con1;
BEGIN;
INSERT INTO t1 VALUES (40, 40, 40, 40, 40, 40, 40, 40);
connection con2;
# When transaction is pending, fail on lock acquisition
INSERT INTO t1 VALUES (40, 40, 40, 40, 40, 40, 40, 40);
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
SELECT COUNT(*) FROM t1;
COUNT(*)
17
connection con1;
COMMIT;
connection con2;
# When transaction is committed, fail on duplicate key
INSERT INTO t1 VALUES (40, 40, 40, 40, 40, 40, 40, 40);
Got one of the listed errors
...
...
@@ -159,4 +171,7 @@ id1 id2 id3 id4 id5 value1 value2 value3
3 3 3 3 3 4 1 1
2 2 2 2 2 3 1 1
1 1 1 1 1 2 0 0
disconnect con1;
disconnect con2;
connection default;
DROP TABLE t1;
storage/rocksdb/mysql-test/rocksdb/t/bloomfilter.inc
View file @
a42b9003
--
source
include
/
have_rocksdb
.
inc
let
tmpl_ddl
=
suite
/
rocksdb
/
t
/
bloomfilter_table_def
.
tmpl
;
let
tmpl_ddl
=
../
storage
/
rocksdb
/
mysql
-
test
/
rocksdb
/
t
/
bloomfilter_table_def
.
tmpl
;
let
ddl
=
$MYSQL_TMP_DIR
/
bloomfilter_create
.
sql
;
DELIMITER
//;
...
...
@@ -19,18 +19,18 @@ DELIMITER ;//
#BF is sometimes invoked and useful
--
exec
sed
s
/
##CF##//g $tmpl_ddl > $ddl
--
source
$ddl
--
source
suite
/
rocksdb
/
t
/
bloomfilter_load_select
.
inc
--
source
t
/
bloomfilter_load_select
.
inc
#BF is always invoked but not useful at all
--
exec
sed
s
/
##CF##/" COMMENT 'cf_short_prefix'"/g $tmpl_ddl > $ddl
--
source
$ddl
--
source
suite
/
rocksdb
/
t
/
bloomfilter_load_select
.
inc
--
source
t
/
bloomfilter_load_select
.
inc
#BF is most of the time invoked and useful
--
exec
sed
s
/
##CF##/" COMMENT 'cf_long_prefix'"/g $tmpl_ddl > $ddl
--
source
$ddl
--
source
suite
/
rocksdb
/
t
/
bloomfilter_load_select
.
inc
--
source
t
/
bloomfilter_load_select
.
inc
# BUG: Prev() with prefix lookup should not use prefix bloom filter
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
View file @
a42b9003
# loading some data (larger than write buf size) to cause compaction
--
exec
perl
suite
/
rocksdb
/
t
/
gen_insert
.
pl
t1
>
$MYSQL_TMP_DIR
/
insert_t1
.
sql
--
exec
perl
suite
/
rocksdb
/
t
/
gen_insert
.
pl
t2
>
$MYSQL_TMP_DIR
/
insert_t2
.
sql
--
exec
perl
../
storage
/
rocksdb
/
mysql
-
test
/
rocksdb
/
t
/
gen_insert
.
pl
t1
>
$MYSQL_TMP_DIR
/
insert_t1
.
sql
--
exec
perl
../
storage
/
rocksdb
/
mysql
-
test
/
rocksdb
/
t
/
gen_insert
.
pl
t2
>
$MYSQL_TMP_DIR
/
insert_t2
.
sql
--
disable_query_log
--
source
$MYSQL_TMP_DIR
/
insert_t1
.
sql
--
source
$MYSQL_TMP_DIR
/
insert_t2
.
sql
...
...
storage/rocksdb/mysql-test/rocksdb/t/compact_deletes_test.inc
View file @
a42b9003
...
...
@@ -37,7 +37,8 @@ let $wait_condition = select count(*) = 0
--
source
include
/
wait_condition
.
inc
--
enable_query_log
--
exec
bash
suite
/
rocksdb
/
t
/
sst_count_rows
.
sh
$MYSQLTEST_VARDIR
$MYSQL_SST_DUMP
$no_more_deletes
let
$MYSQL_SST_DUMP
=../
storage
/
rocksdb
/
sst_dump
--
exec
bash
../
storage
/
rocksdb
/
mysql
-
test
/
rocksdb
/
t
/
sst_count_rows
.
sh
$MYSQLTEST_VARDIR
$MYSQL_SST_DUMP
$no_more_deletes
eval
SET
GLOBAL
rocksdb_compaction_sequential_deletes
=
$save_rocksdb_compaction_sequential_deletes
;
eval
SET
GLOBAL
rocksdb_compaction_sequential_deletes_file_size
=
$save_rocksdb_compaction_sequential_deletes_file_size
;
eval
SET
GLOBAL
rocksdb_compaction_sequential_deletes_window
=
$save_rocksdb_compaction_sequential_deletes_window
;
storage/rocksdb/mysql-test/rocksdb/t/drop_table2.test
View file @
a42b9003
...
...
@@ -105,6 +105,6 @@ let $wait_condition = select count(*) = 0
# Check that space is reclaimed
--
exec
du
-
c
$MYSQLTEST_VARDIR
/
mysqld
.
1
/
data
/.
rocksdb
/*.
sst
|
grep
total
|
sed
's/[\t]total/ after/'
>>
$output
--
exec
perl
suite
/
rocksdb
/
t
/
drop_table2_check
.
pl
$output
--
exec
perl
../
storage
/
rocksdb
/
mysql
-
test
/
rocksdb
/
t
/
drop_table2_check
.
pl
$output
# Cleanup
storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.test
View file @
a42b9003
...
...
@@ -57,7 +57,7 @@ while ($i<10000)
--
enable_query_log
check
table
t4
;
--
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
--
exec
perl
suite
/
rocksdb
/
t
/
rocksdb_checksums
.
pl
$MYSQL_TMP_DIR
/
rocksdb_checksums
.
log
10000
5
--
exec
perl
../
storage
/
rocksdb
/
mysql
-
test
/
rocksdb
/
t
/
rocksdb_checksums
.
pl
$MYSQL_TMP_DIR
/
rocksdb_checksums
.
log
10000
5
--
remove_file
$MYSQL_TMP_DIR
/
rocksdb_checksums
.
log
set
session
rocksdb_checksums_pct
=
100
;
...
...
@@ -70,7 +70,7 @@ insert into mtr.test_suppressions values
(
'Data with incorrect checksum'
);
--
echo
# 1. Start with mismatch in key checksum of the PK.
set
session
debug
=
"+d,myrocks_simulate_bad_pk_checksum1"
;
set
session
debug
_dbug
=
"+d,myrocks_simulate_bad_pk_checksum1"
;
set
session
rocksdb_verify_checksums
=
off
;
select
*
from
t3
;
set
session
rocksdb_verify_checksums
=
on
;
...
...
@@ -78,10 +78,10 @@ set session rocksdb_verify_checksums=on;
select
*
from
t3
;
--
error
ER_INTERNAL_ERROR
select
*
from
t4
;
set
session
debug
=
"-d,myrocks_simulate_bad_pk_checksum1"
;
set
session
debug
_dbug
=
"-d,myrocks_simulate_bad_pk_checksum1"
;
--
echo
# 2. Continue with mismatch in pk value checksum.
set
session
debug
=
"+d,myrocks_simulate_bad_pk_checksum2"
;
set
session
debug
_dbug
=
"+d,myrocks_simulate_bad_pk_checksum2"
;
set
session
rocksdb_verify_checksums
=
off
;
select
*
from
t3
;
set
session
rocksdb_verify_checksums
=
on
;
...
...
@@ -89,7 +89,7 @@ set session rocksdb_verify_checksums=on;
select
*
from
t3
;
--
error
ER_INTERNAL_ERROR
select
*
from
t4
;
set
session
debug
=
"-d,myrocks_simulate_bad_pk_checksum2"
;
set
session
debug
_dbug
=
"-d,myrocks_simulate_bad_pk_checksum2"
;
--
echo
# 3. Check if we catch checksum mismatches for secondary indexes
--
replace_column
9
#
...
...
@@ -97,12 +97,12 @@ explain
select
*
from
t3
force
index
(
a
)
where
a
<
4
;
select
*
from
t3
force
index
(
a
)
where
a
<
4
;
set
session
debug
=
"+d,myrocks_simulate_bad_key_checksum1"
;
set
session
debug
_dbug
=
"+d,myrocks_simulate_bad_key_checksum1"
;
--
error
ER_INTERNAL_ERROR
select
*
from
t3
force
index
(
a
)
where
a
<
4
;
--
error
ER_INTERNAL_ERROR
select
*
from
t4
force
index
(
a
)
where
a
<
1000000
;
set
session
debug
=
"-d,myrocks_simulate_bad_key_checksum1"
;
set
session
debug
_dbug
=
"-d,myrocks_simulate_bad_key_checksum1"
;
--
echo
# 4. The same for index-only reads?
--
replace_column
9
#
...
...
@@ -110,12 +110,12 @@ explain
select
a
from
t3
force
index
(
a
)
where
a
<
4
;
select
a
from
t3
force
index
(
a
)
where
a
<
4
;
set
session
debug
=
"+d,myrocks_simulate_bad_key_checksum1"
;
set
session
debug
_dbug
=
"+d,myrocks_simulate_bad_key_checksum1"
;
--
error
ER_INTERNAL_ERROR
select
a
from
t3
force
index
(
a
)
where
a
<
4
;
--
error
ER_INTERNAL_ERROR
select
a
from
t4
force
index
(
a
)
where
a
<
1000000
;
set
session
debug
=
"-d,myrocks_simulate_bad_key_checksum1"
;
set
session
debug
_dbug
=
"-d,myrocks_simulate_bad_key_checksum1"
;
set
@@
global
.
rocksdb_store_checksums
=@
save_rocksdb_store_checksums
;
set
@@
global
.
rocksdb_verify_checksums
=@
save_rocksdb_verify_checksums
;
...
...
storage/rocksdb/mysql-test/rocksdb/t/unique_sec_rev_cf.test
View file @
a42b9003
--
source
include
/
have_rocksdb
.
inc
let
ddl
=
$MYSQL_TMP_DIR
/
unique_sec_rev_cf
.
sql
;
--
exec
sed
s
/
##CF##/" COMMENT 'rev:cf'"/g
suite
/rocksdb/t/unique_sec.inc > $ddl
--
exec
sed
s
/
##CF##/" COMMENT 'rev:cf'"/g
../storage/rocksdb/mysql-test
/rocksdb/t/unique_sec.inc > $ddl
--
source
$ddl
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment