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
a89d01fb
Commit
a89d01fb
authored
Jul 29, 2017
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trivial updates to get a few rocksdb.* testcases to pass
parent
f2952485
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
76 additions
and
23 deletions
+76
-23
storage/rocksdb/mysql-test/rocksdb/include/restart_mysqld_with_option.inc
...mysql-test/rocksdb/include/restart_mysqld_with_option.inc
+31
-0
storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key.result
.../rocksdb/mysql-test/rocksdb/r/allow_no_primary_key.result
+1
-1
storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result
...db/mysql-test/rocksdb/r/corrupted_data_reads_debug.result
+5
-5
storage/rocksdb/mysql-test/rocksdb/r/foreign_key.result
storage/rocksdb/mysql-test/rocksdb/r/foreign_key.result
+4
-4
storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result
...e/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result
+1
-1
storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result
storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result
+1
-1
storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_read_filtering.result
...db/mysql-test/rocksdb/r/ttl_primary_read_filtering.result
+16
-0
storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_with_partitions.result
...b/mysql-test/rocksdb/r/ttl_primary_with_partitions.result
+6
-6
storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf.test
storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf.test
+1
-0
storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf_and_data.test
...cksdb/mysql-test/rocksdb/t/bulk_load_rev_cf_and_data.test
+1
-0
storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_data.test
storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_data.test
+1
-0
storage/rocksdb/mysql-test/rocksdb/t/disabled.def
storage/rocksdb/mysql-test/rocksdb/t/disabled.def
+3
-0
storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_with_partitions.test
...sdb/mysql-test/rocksdb/t/ttl_primary_with_partitions.test
+1
-0
storage/rocksdb/mysql-test/rocksdb/t/varbinary_format.test
storage/rocksdb/mysql-test/rocksdb/t/varbinary_format.test
+4
-4
storage/rocksdb/mysql-test/rocksdb/t/write_sync.test
storage/rocksdb/mysql-test/rocksdb/t/write_sync.test
+0
-1
No files found.
storage/rocksdb/mysql-test/rocksdb/include/restart_mysqld_with_option.inc
0 → 100644
View file @
a89d01fb
if
(
$rpl_inited
)
{
if
(
!
$allow_rpl_inited
)
{
--
die
ERROR
IN
TEST
:
This
script
does
not
support
replication
}
}
# Write file to make mysql-test-run.pl expect the "crash", but don't start
# it until it's told to
--
let
$_server_id
=
`SELECT @@server_id`
--
let
$_expect_file_name
=
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
$_server_id
.
expect
--
exec
echo
"wait"
>
$_expect_file_name
# Send shutdown to the connected server and give
# it 10 seconds to die before zapping it
shutdown_server
10
;
# Write file to make mysql-test-run.pl start up the server again
--
exec
echo
"restart:
$_mysqld_option
"
>
$_expect_file_name
# Turn on reconnect
--
enable_reconnect
# Call script that will poll the server waiting for it to be back online again
--
source
include
/
wait_until_connected_again
.
inc
# Turn off reconnect again
--
disable_reconnect
storage/rocksdb/mysql-test/rocksdb/r/allow_no_primary_key.result
View file @
a89d01fb
...
...
@@ -241,7 +241,7 @@ a b
2 b
EXPLAIN SELECT * FROM t1 WHERE a = 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const a a 5 const 1
NULL
1 SIMPLE t1 const a a 5 const 1
DROP TABLE t1;
CREATE TABLE t1 (a INT, b CHAR(8)) ENGINE=rocksdb;
SHOW CREATE TABLE t1;
...
...
storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result
View file @
a89d01fb
...
...
@@ -20,7 +20,7 @@ set @tmp1=@@rocksdb_verify_row_debug_checksums;
set rocksdb_verify_row_debug_checksums=1;
set session debug_dbug= "+d,myrocks_simulate_bad_row_read1";
select * from t1 where pk=1;
ERROR HY000: Got error
199
'Found data corruption.' from ROCKSDB
ERROR HY000: Got error
200
'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_row_read1";
set rocksdb_verify_row_debug_checksums=@tmp1;
select * from t1 where pk=1;
...
...
@@ -28,11 +28,11 @@ pk col1
1 1
set session debug_dbug= "+d,myrocks_simulate_bad_row_read2";
select * from t1 where pk=1;
ERROR HY000: Got error
199
'Found data corruption.' from ROCKSDB
ERROR HY000: Got error
200
'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_row_read2";
set session debug_dbug= "+d,myrocks_simulate_bad_row_read3";
select * from t1 where pk=1;
ERROR HY000: Got error
199
'Found data corruption.' from ROCKSDB
ERROR HY000: Got error
200
'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_row_read3";
insert into t1 values(4,'0123456789');
select * from t1;
...
...
@@ -56,7 +56,7 @@ pk col1
ABCD 1
set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1";
select * from t2;
ERROR HY000: Got error
199
'Found data corruption.' from ROCKSDB
ERROR HY000: Got error
200
'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1";
drop table t2;
create table t2 (
...
...
@@ -69,6 +69,6 @@ pk col1
ABCD 1
set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1";
select * from t2;
ERROR HY000: Got error
199
'Found data corruption.' from ROCKSDB
ERROR HY000: Got error
200
'Found data corruption.' from ROCKSDB
set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1";
drop table t2;
storage/rocksdb/mysql-test/rocksdb/r/foreign_key.result
View file @
a89d01fb
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (b INT PRIMARY KEY);
CREATE TABLE t2 (a INT NOT NULL, b INT NOT NULL, FOREIGN KEY (b) REFERENCES t1(b));
ERROR 42000: This version of M
ySQL
doesn't yet support 'FOREIGN KEY for the RocksDB storage engine'
ERROR 42000: This version of M
ariaDB
doesn't yet support 'FOREIGN KEY for the RocksDB storage engine'
CREATE TABLE t2 (a INT NOT NULL, bforeign INT NOT NULL);
DROP TABLE t2;
CREATE TABLE t2 (a INT NOT NULL, foreignkey INT NOT NULL);
DROP TABLE t2;
CREATE TABLE t2 (a INT NOT NULL, bforeign INT not null, FOREIGN KEY (bforeign) REFERENCES t1(b));
ERROR 42000: This version of M
ySQL
doesn't yet support 'FOREIGN KEY for the RocksDB storage engine'
ERROR 42000: This version of M
ariaDB
doesn't yet support 'FOREIGN KEY for the RocksDB storage engine'
CREATE TABLE t2 (a INT NOT NULL, b INT NOT NULL);
ALTER TABLE t2 ADD FOREIGN KEY (b) REFERENCES t1(b);
ERROR 42000: This version of M
ySQL
doesn't yet support 'FOREIGN KEY for the RocksDB storage engine'
ERROR 42000: This version of M
ariaDB
doesn't yet support 'FOREIGN KEY for the RocksDB storage engine'
DROP TABLE t2;
CREATE TABLE t2 (a INT NOT NULL);
ALTER TABLE t2 ADD bforeign INT NOT NULL;
...
...
@@ -20,6 +20,6 @@ ALTER TABLE t2 ADD foreignkey INT NOT NULL;
DROP TABLE t2;
CREATE TABLE t2 (a INT NOT NULL);
ALTER TABLE t2 ADD bforeign INT NOT NULL, ADD FOREIGN KEY (bforeign) REFERENCES t1(b);
ERROR 42000: This version of M
ySQL
doesn't yet support 'FOREIGN KEY for the RocksDB storage engine'
ERROR 42000: This version of M
ariaDB
doesn't yet support 'FOREIGN KEY for the RocksDB storage engine'
DROP TABLE t2;
DROP TABLE t1;
storage/rocksdb/mysql-test/rocksdb/r/index_merge_rocksdb.result
View file @
a89d01fb
...
...
@@ -31,7 +31,7 @@ test.t1 analyze status OK
set global rocksdb_force_flush_memtable_now=1;
explain select * from t1 where key1 = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1 key1 5 const #
NULL
1 SIMPLE t1 ref key1 key1 5 const #
explain select key1,key2 from t1 where key1 = 1 or key2 = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL # Using union(key1,key2); Using where
...
...
storage/rocksdb/mysql-test/rocksdb/r/rocksdb_parts.result
View file @
a89d01fb
...
...
@@ -94,7 +94,7 @@ drop table t1, t2;
CREATE TABLE t1 (c1 INT NOT NULL, c2 CHAR(5)) PARTITION BY HASH(c1) PARTITIONS 4;
INSERT INTO t1 VALUES(1,'a');
RENAME TABLE t1 TO db3.t3;
ERROR HY000: Error on rename of './test/t1' to './db3/t3' (errno: -1
- Unknown error -1
)
ERROR HY000: Error on rename of './test/t1' to './db3/t3' (errno: -1
"Internal error < 0 (Not system error)"
)
SELECT * FROM t1;
c1 c2
1 a
...
...
storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_read_filtering.result
View file @
a89d01fb
...
...
@@ -171,11 +171,14 @@ SELECT * FROM t1;
a b
998 5
DROP TABLE t1;
connect con1,localhost,root,,;
connect con2,localhost,root,,;
CREATE TABLE t1 (
a int PRIMARY KEY
) ENGINE=rocksdb
COMMENT='ttl_duration=5;';
INSERT INTO t1 values (1);
connection con1;
# Creating Snapshot (start transaction)
BEGIN;
SELECT * FROM t1;
...
...
@@ -185,11 +188,13 @@ SELECT * FROM t1;
a
1
# Switching to connection 2
connection con2;
set global rocksdb_force_flush_memtable_now=1;
set global rocksdb_compact_cf='default';
SELECT * FROM t1;
a
# Switching to connection 1
connection con1;
SELECT * FROM t1;
a
1
...
...
@@ -201,6 +206,10 @@ COMMIT;
SELECT * FROM t1;
a
DROP TABLE t1;
disconnect con1;
disconnect con2;
connect con1,localhost,root,,;
connect con2,localhost,root,,;
set global rocksdb_force_flush_memtable_now=1;
set global rocksdb_compact_cf='default';
CREATE TABLE t1 (
...
...
@@ -208,11 +217,13 @@ a int PRIMARY KEY
) ENGINE=rocksdb
COMMENT='ttl_duration=1;';
# On Connection 1
connection con1;
# Creating Snapshot (start transaction)
BEGIN;
SELECT * FROM t1;
a
# On Connection 2
connection con2;
set global rocksdb_debug_ttl_rec_ts = -2;
INSERT INTO t1 values (1);
INSERT INTO t1 values (3);
...
...
@@ -222,9 +233,11 @@ set global rocksdb_debug_ttl_rec_ts = 0;
set global rocksdb_force_flush_memtable_now=1;
set global rocksdb_compact_cf='default';
# On Connection 1
connection con1;
SELECT * FROM t1;
a
# On Connection 2
connection con2;
SELECT * FROM t1;
a
set global rocksdb_enable_ttl_read_filtering=0;
...
...
@@ -235,4 +248,7 @@ a
5
7
set global rocksdb_enable_ttl_read_filtering=1;
disconnect con2;
disconnect con1;
connection default;
DROP TABLE t1;
storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_with_partitions.result
View file @
a89d01fb
...
...
@@ -144,16 +144,16 @@ set global rocksdb_debug_ttl_rec_ts = 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL
DEFAULT '0'
,
`c2` int(11) NOT NULL
DEFAULT '0'
,
`c1` int(11) NOT NULL,
`c2` int(11) NOT NULL,
`name` varchar(25) NOT NULL,
`event` date DEFAULT NULL,
PRIMARY KEY (`c2`,`c1`) COMMENT 'custom_p0_cfname=foo;custom_p1_cfname=bar;custom_p2_cfname=baz;'
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COMMENT='custom_p0_ttl_duration=9999;custom_p2_ttl_duration=5;'
/*!50100 PARTITION BY LIST (c1
)
(PARTITION
custom_p0
VALUES IN (1,2,3) ENGINE = ROCKSDB,
PARTITION
custom_p1
VALUES IN (4,5,6) ENGINE = ROCKSDB,
PARTITION
custom_p2 VALUES IN (7,8,9) ENGINE = ROCKSDB) */
PARTITION BY LIST (`c1`
)
(PARTITION
`custom_p0`
VALUES IN (1,2,3) ENGINE = ROCKSDB,
PARTITION
`custom_p1`
VALUES IN (4,5,6) ENGINE = ROCKSDB,
PARTITION
`custom_p2` VALUES IN (7,8,9) ENGINE = ROCKSDB)
set global rocksdb_debug_ttl_snapshot_ts = 100;
set global rocksdb_force_flush_memtable_now=1;
set @@global.rocksdb_compact_cf = 'baz';
...
...
storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf.test
View file @
a89d01fb
--
source
include
/
have_rocksdb
.
inc
--
source
include
/
have_partition
.
inc
--
let
pk_cf
=
rev
:
cf1
--
let
data_order_desc
=
0
...
...
storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_cf_and_data.test
View file @
a89d01fb
--
source
include
/
have_rocksdb
.
inc
--
source
include
/
have_partition
.
inc
--
let
pk_cf
=
rev
:
cf1
--
let
data_order_desc
=
1
...
...
storage/rocksdb/mysql-test/rocksdb/t/bulk_load_rev_data.test
View file @
a89d01fb
--
source
include
/
have_rocksdb
.
inc
--
source
include
/
have_partition
.
inc
--
let
pk_cf
=
cf1
--
let
data_order_desc
=
1
...
...
storage/rocksdb/mysql-test/rocksdb/t/disabled.def
View file @
a89d01fb
...
...
@@ -70,3 +70,6 @@ col_opt_null : : MDEV-12474 - Fails in fulltest
col_opt_unsigned : MDEV-12474 - Fails in fulltest
col_opt_zerofill : MDEV-12474 - Fails in fulltest
type_float : MDEV-12474 - Fails in fulltest
native_procedure : Not supported in MariaDB
storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_with_partitions.test
View file @
a89d01fb
--
source
include
/
have_debug
.
inc
--
source
include
/
have_rocksdb
.
inc
--
source
include
/
have_partition
.
inc
#
# Create a table with multiple partitions, but in the comment don't specify
...
...
storage/rocksdb/mysql-test/rocksdb/t/varbinary_format.test
View file @
a89d01fb
...
...
@@ -34,11 +34,11 @@ DROP TABLE t1;
# Now create the same table in the old format to show that they can be read
# and handled correctly
set
session
debug
=
'+d,MYROCKS_LEGACY_VARBINARY_FORMAT'
;
set
session
debug
_dbug
=
'+d,MYROCKS_LEGACY_VARBINARY_FORMAT'
;
CREATE
TABLE
t1
(
vb
VARBINARY
(
64
)
primary
key
)
ENGINE
=
rocksdb
;
set
session
debug
=
'-d,MYROCKS_LEGACY_VARBINARY_FORMAT'
;
set
session
debug
_dbug
=
'-d,MYROCKS_LEGACY_VARBINARY_FORMAT'
;
INSERT
INTO
t1
values
(
0x00
);
INSERT
INTO
t1
values
(
0x0000
);
...
...
@@ -98,11 +98,11 @@ DROP TABLE t1;
# Now create the same table in the old format to show that they can be read
# and handled correctly
set
session
debug
=
'+d,MYROCKS_LEGACY_VARBINARY_FORMAT'
;
set
session
debug
_dbug
=
'+d,MYROCKS_LEGACY_VARBINARY_FORMAT'
;
CREATE
TABLE
t1
(
vc
VARCHAR
(
64
)
collate
'binary'
primary
key
)
ENGINE
=
rocksdb
;
set
session
debug
=
'-d,MYROCKS_LEGACY_VARBINARY_FORMAT'
;
set
session
debug
_dbug
=
'-d,MYROCKS_LEGACY_VARBINARY_FORMAT'
;
INSERT
INTO
t1
values
(
'a'
);
INSERT
INTO
t1
values
(
'aa'
);
...
...
storage/rocksdb/mysql-test/rocksdb/t/write_sync.test
View file @
a89d01fb
...
...
@@ -5,7 +5,6 @@ SET GLOBAL rocksdb_write_disable_wal=false;
SET
GLOBAL
rocksdb_write_ignore_missing_column_families
=
true
;
create
table
aaa
(
id
int
primary
key
,
i
int
)
engine
rocksdb
;
set
@
save_rocksdb_flush_log_at_trx_commit
=
@@
global
.
rocksdb_flush_log_at_trx_commit
;
set
@
save_rocksdb_flush_log_at_trx_commit
=@@
global
.
rocksdb_flush_log_at_trx_commit
;
SET
GLOBAL
rocksdb_flush_log_at_trx_commit
=
0
;
sleep
30
;
...
...
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