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
0ab7cb23
Commit
0ab7cb23
authored
Nov 05, 2016
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MariaRocks port: More of testcase Maria-fication
parent
a42b9003
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
383 additions
and
56 deletions
+383
-56
mysql-test/include/have_rocksdb.opt
mysql-test/include/have_rocksdb.opt
+8
-1
storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result
...db/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result
+300
-27
storage/rocksdb/mysql-test/rocksdb/r/type_decimal.result
storage/rocksdb/mysql-test/rocksdb/r/type_decimal.result
+2
-2
storage/rocksdb/mysql-test/rocksdb/r/type_varchar_debug.result
...ge/rocksdb/mysql-test/rocksdb/r/type_varchar_debug.result
+10
-10
storage/rocksdb/mysql-test/rocksdb/r/unique_sec.result
storage/rocksdb/mysql-test/rocksdb/r/unique_sec.result
+15
-0
storage/rocksdb/mysql-test/rocksdb/t/bulk_load.test
storage/rocksdb/mysql-test/rocksdb/t/bulk_load.test
+1
-0
storage/rocksdb/mysql-test/rocksdb/t/drop_table.test
storage/rocksdb/mysql-test/rocksdb/t/drop_table.test
+1
-1
storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled-master.opt
...ysql-test/rocksdb/t/innodb_i_s_tables_disabled-master.opt
+30
-0
storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled.test
...ksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled.test
+2
-2
storage/rocksdb/mysql-test/rocksdb/t/type_decimal.test
storage/rocksdb/mysql-test/rocksdb/t/type_decimal.test
+2
-2
storage/rocksdb/mysql-test/rocksdb/t/type_varchar_debug.test
storage/rocksdb/mysql-test/rocksdb/t/type_varchar_debug.test
+10
-10
storage/rocksdb/mysql-test/rocksdb/t/unique_sec.test
storage/rocksdb/mysql-test/rocksdb/t/unique_sec.test
+2
-1
No files found.
mysql-test/include/have_rocksdb.opt
View file @
0ab7cb23
--loose-enable-rocksdb --loose-enable-rocksdb_global_info --loose-enable-rocksdb_ddl --loose-enable-rocksdb_cf_options --loose-enable_rocksdb_perf_context --loose-enable-rocksdb_index_file_map --loose-enable-rocksdb_dbstats
--loose-enable-rocksdb
--loose-enable-rocksdb_global_info
--loose-enable-rocksdb_ddl
--loose-enable-rocksdb_cf_options
--loose-enable_rocksdb_perf_context
--loose-enable_rocksdb_perf_context_global
--loose-enable-rocksdb_index_file_map
--loose-enable-rocksdb_dbstats
storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result
View file @
0ab7cb23
This diff is collapsed.
Click to expand it.
storage/rocksdb/mysql-test/rocksdb/r/type_decimal.result
View file @
0ab7cb23
...
...
@@ -5,7 +5,7 @@ drop table if exists t1, t2;
create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
# First, make the server to create a dataset in the old format:
set session debug= '+d,MYROCKS_FORMAT_VERSION_INITIAL';
set session debug
_dbug
= '+d,MYROCKS_FORMAT_VERSION_INITIAL';
create table t1 (
pk1 decimal(32,16),
pk2 decimal(32,16),
...
...
@@ -29,7 +29,7 @@ where TABLE_SCHEMA=database() AND table_name='t1';
table_name index_name kv_format_version
t1 PRIMARY 10
flush tables;
set session debug= '-d,MYROCKS_FORMAT_VERSION_INITIAL';
set session debug
_dbug
= '-d,MYROCKS_FORMAT_VERSION_INITIAL';
# Check that the new server reads the data in the old format:
select * from t1 order by pk1,pk2,pk3 limit 5;
pk1 pk2 pk3 a
...
...
storage/rocksdb/mysql-test/rocksdb/r/type_varchar_debug.result
View file @
0ab7cb23
drop table if exists t1,t2;
set session debug= "+d,myrocks_enable_unknown_collation_index_only_scans";
set session debug
_dbug
= "+d,myrocks_enable_unknown_collation_index_only_scans";
#
# Issue 257: Sort order for varchars is different between
# MyISAM/InnoDB vs MyRocks
...
...
@@ -112,11 +112,11 @@ pk length(a) rtrim(a)
1 301 a
2 301 b
drop table t1;
set session debug= "-d,myrocks_enable_unknown_collation_index_only_scans";
set session debug
_dbug
= "-d,myrocks_enable_unknown_collation_index_only_scans";
#
# Check backwards compatibility:
#
set session debug= '+d,MYROCKS_FORMAT_VERSION_INITIAL';
set session debug
_dbug
= '+d,MYROCKS_FORMAT_VERSION_INITIAL';
# Create the tables in the old format
create table t1 (
pk varchar(64) collate latin1_bin,
...
...
@@ -154,7 +154,7 @@ t1 PRIMARY 10
t2 PRIMARY 10
t2 col1 10
flush tables;
set session debug= '-d,MYROCKS_FORMAT_VERSION_INITIAL';
set session debug
_dbug
= '-d,MYROCKS_FORMAT_VERSION_INITIAL';
select pk, hex(pk), col1 from t1;
pk hex(pk) col1
a 61 a
...
...
@@ -177,13 +177,13 @@ drop table t1,t2;
#
# General upgrade tests to see that they work.
#
set session debug= '+d,MYROCKS_FORMAT_VERSION_INITIAL';
set session debug
_dbug
= '+d,MYROCKS_FORMAT_VERSION_INITIAL';
create table t2 (
id int primary key,
col1 varchar(64) collate latin1_swedish_ci,
unique key (col1)
) engine=rocksdb;
set session debug= '-d,MYROCKS_FORMAT_VERSION_INITIAL';
set session debug
_dbug
= '-d,MYROCKS_FORMAT_VERSION_INITIAL';
insert into t2 values (1, 'a');
insert into t2 values (2, 'b');
insert into t2 values (3, 'c');
...
...
@@ -204,13 +204,13 @@ c
insert into t2 values (4, 'c ');
ERROR 23000: Duplicate entry 'c ' for key 'col1'
drop table t2;
set session debug= '+d,MYROCKS_FORMAT_VERSION_INITIAL';
set session debug
_dbug
= '+d,MYROCKS_FORMAT_VERSION_INITIAL';
create table t2 (
id int primary key,
col1 varchar(64) collate latin1_bin,
unique key (col1)
) engine=rocksdb;
set session debug= '-d,MYROCKS_FORMAT_VERSION_INITIAL';
set session debug
_dbug
= '-d,MYROCKS_FORMAT_VERSION_INITIAL';
insert into t2 values (1, 'a');
insert into t2 values (2, 'b');
insert into t2 values (3, 'c');
...
...
@@ -235,7 +235,7 @@ drop table t2;
# Check what happens when one tries to 'upgrade' to the new data format
# and causes a unique key violation:
#
set session debug= '+d,MYROCKS_FORMAT_VERSION_INITIAL';
set session debug
_dbug
= '+d,MYROCKS_FORMAT_VERSION_INITIAL';
create table t2 (
pk int not null primary key,
col1 varchar(64) collate latin1_bin,
...
...
@@ -248,7 +248,7 @@ select * from t2;
pk col1 col2
1 a a-space
2 a a
set session debug= '-d,MYROCKS_FORMAT_VERSION_INITIAL';
set session debug
_dbug
= '-d,MYROCKS_FORMAT_VERSION_INITIAL';
alter table t2 engine=rocksdb;
ERROR 23000: Duplicate entry 'a' for key 'col1'
drop table t2;
storage/rocksdb/mysql-test/rocksdb/r/unique_sec.result
View file @
0ab7cb23
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,6 +171,9 @@ id1 id2 id3 id4 id5 value1 value2 value3
38 31 32 NULL 38 37 37 37
39 31 32 NULL 39 37 37 37
40 40 40 40 40 40 40 40
disconnect con1;
disconnect con2;
connection default;
DROP TABLE t1;
#
# Issue #88: Creating unique index over column with duplicate values succeeds
...
...
storage/rocksdb/mysql-test/rocksdb/t/bulk_load.test
View file @
0ab7cb23
--
source
include
/
have_rocksdb
.
inc
--
source
include
/
have_partition
.
inc
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
,
t2
;
...
...
storage/rocksdb/mysql-test/rocksdb/t/drop_table.test
View file @
0ab7cb23
...
...
@@ -109,7 +109,7 @@ let $wait_condition = select count(*) = 0
# Get list of all indices needing to be dropped
# Check total compacted-away rows for all indices
# Check that all indices have been successfully dropped
--
exec
perl
suite
/
rocksdb
/
t
/
drop_table_compactions
.
pl
$MYSQLTEST_VARDIR
/
log
/
mysqld
.
1.
err
--
exec
perl
../
storage
/
rocksdb
/
mysql
-
test
/
rocksdb
/
t
/
drop_table_compactions
.
pl
$MYSQLTEST_VARDIR
/
log
/
mysqld
.
1.
err
# Cleanup
drop
table
t1
;
storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled-master.opt
0 → 100644
View file @
0ab7cb23
--loose-enable-innodb_trx
--loose-enable-innodb_file_status
--loose-enable-innodb_locks
--loose-enable-innodb_lock_waits
--loose-enable-innodb_cmp
--loose-enable-innodb_cmp_reset
--loose-enable-innodb_cmp_per_index
--loose-enable-innodb_cmp_per_index_reset
--loose-enable-innodb_cmpmem
--loose-enable-innodb_cmpmem_reset
--loose-enable-innodb_metrics
--loose-enable-innodb_ft_default_stopword
--loose-enable-innodb_ft_deleted
--loose-enable-innodb_ft_being_deleted
--loose-enable-innodb_ft_index_cache
--loose-enable-innodb_ft_index_table
--loose-enable-innodb_ft_config
--loose-enable-innodb_buffer_pool_stats
--loose-enable-innodb_buffer_page
--loose-enable-innodb_buffer_page_lru
--loose-enable-innodb_sys_tables
--loose-enable-innodb_sys_tablestats
--loose-enable-innodb_sys_indexes
--loose-enable-innodb_sys_columns
--loose-enable-innodb_sys_fields
--loose-enable-innodb_sys_foreign
--loose-enable-innodb_sys_foreign_cols
--loose-enable-innodb_sys_tablespaces
--loose-enable-innodb_sys_datafiles
--loose-enable-innodb_sys_docstore_fields
storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled.test
View file @
0ab7cb23
...
...
@@ -4,7 +4,7 @@
# is turned off and attempting to access them doesn't crash.
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_TRX
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_FILE_STATUS
;
#Not in MariaDB:
SELECT * FROM INFORMATION_SCHEMA.INNODB_FILE_STATUS;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_LOCKS
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_LOCK_WAITS
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_CMP
;
...
...
@@ -32,4 +32,4 @@ SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_SYS_FOREIGN_COLS
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_SYS_TABLESPACES
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_SYS_DATAFILES
;
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_SYS_DOCSTORE_FIELDS
;
#Not in MariaDB:
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_DOCSTORE_FIELDS;
storage/rocksdb/mysql-test/rocksdb/t/type_decimal.test
View file @
0ab7cb23
...
...
@@ -12,7 +12,7 @@ create table t0(a int);
insert
into
t0
values
(
0
),(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
);
--
echo
# First, make the server to create a dataset in the old format:
set
session
debug
=
'+d,MYROCKS_FORMAT_VERSION_INITIAL'
;
set
session
debug
_dbug
=
'+d,MYROCKS_FORMAT_VERSION_INITIAL'
;
create
table
t1
(
pk1
decimal
(
32
,
16
),
pk2
decimal
(
32
,
16
),
...
...
@@ -40,7 +40,7 @@ where TABLE_SCHEMA=database() AND table_name='t1';
flush
tables
;
set
session
debug
=
'-d,MYROCKS_FORMAT_VERSION_INITIAL'
;
set
session
debug
_dbug
=
'-d,MYROCKS_FORMAT_VERSION_INITIAL'
;
--
source
include
/
restart_mysqld
.
inc
--
echo
# Check that the new server reads the data in the old format:
...
...
storage/rocksdb/mysql-test/rocksdb/t/type_varchar_debug.test
View file @
0ab7cb23
...
...
@@ -9,18 +9,18 @@ drop table if exists t1,t2;
--
enable_warnings
set
session
debug
=
"+d,myrocks_enable_unknown_collation_index_only_scans"
;
set
session
debug
_dbug
=
"+d,myrocks_enable_unknown_collation_index_only_scans"
;
--
let
$character_set_collate
=
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
--
source
type_varchar_endspace
.
inc
set
session
debug
=
"-d,myrocks_enable_unknown_collation_index_only_scans"
;
set
session
debug
_dbug
=
"-d,myrocks_enable_unknown_collation_index_only_scans"
;
--
echo
#
--
echo
# Check backwards compatibility:
--
echo
#
set
session
debug
=
'+d,MYROCKS_FORMAT_VERSION_INITIAL'
;
set
session
debug
_dbug
=
'+d,MYROCKS_FORMAT_VERSION_INITIAL'
;
--
echo
# Create the tables in the old format
...
...
@@ -53,7 +53,7 @@ from information_schema.ROCKSDB_DDL
where
TABLE_SCHEMA
=
database
()
AND
table_name
in
(
't1'
,
't2'
);
flush
tables
;
set
session
debug
=
'-d,MYROCKS_FORMAT_VERSION_INITIAL'
;
set
session
debug
_dbug
=
'-d,MYROCKS_FORMAT_VERSION_INITIAL'
;
select
pk
,
hex
(
pk
),
col1
from
t1
;
select
pk
,
col1
,
hex
(
col1
),
col2
from
t2
;
...
...
@@ -69,13 +69,13 @@ drop table t1,t2;
--
echo
#
--
echo
# General upgrade tests to see that they work.
--
echo
#
set
session
debug
=
'+d,MYROCKS_FORMAT_VERSION_INITIAL'
;
set
session
debug
_dbug
=
'+d,MYROCKS_FORMAT_VERSION_INITIAL'
;
create
table
t2
(
id
int
primary
key
,
col1
varchar
(
64
)
collate
latin1_swedish_ci
,
unique
key
(
col1
)
)
engine
=
rocksdb
;
set
session
debug
=
'-d,MYROCKS_FORMAT_VERSION_INITIAL'
;
set
session
debug
_dbug
=
'-d,MYROCKS_FORMAT_VERSION_INITIAL'
;
insert
into
t2
values
(
1
,
'a'
);
insert
into
t2
values
(
2
,
'b'
);
...
...
@@ -91,13 +91,13 @@ select col1 from t2;
insert
into
t2
values
(
4
,
'c '
);
drop
table
t2
;
set
session
debug
=
'+d,MYROCKS_FORMAT_VERSION_INITIAL'
;
set
session
debug
_dbug
=
'+d,MYROCKS_FORMAT_VERSION_INITIAL'
;
create
table
t2
(
id
int
primary
key
,
col1
varchar
(
64
)
collate
latin1_bin
,
unique
key
(
col1
)
)
engine
=
rocksdb
;
set
session
debug
=
'-d,MYROCKS_FORMAT_VERSION_INITIAL'
;
set
session
debug
_dbug
=
'-d,MYROCKS_FORMAT_VERSION_INITIAL'
;
insert
into
t2
values
(
1
,
'a'
);
insert
into
t2
values
(
2
,
'b'
);
...
...
@@ -117,7 +117,7 @@ drop table t2;
--
echo
# Check what happens when one tries to 'upgrade' to the new data format
--
echo
# and causes a unique key violation:
--
echo
#
set
session
debug
=
'+d,MYROCKS_FORMAT_VERSION_INITIAL'
;
set
session
debug
_dbug
=
'+d,MYROCKS_FORMAT_VERSION_INITIAL'
;
create
table
t2
(
pk
int
not
null
primary
key
,
col1
varchar
(
64
)
collate
latin1_bin
,
...
...
@@ -129,7 +129,7 @@ insert into t2 values (1, 'a ', 'a-space');
insert
into
t2
values
(
2
,
'a'
,
'a'
);
select
*
from
t2
;
set
session
debug
=
'-d,MYROCKS_FORMAT_VERSION_INITIAL'
;
set
session
debug
_dbug
=
'-d,MYROCKS_FORMAT_VERSION_INITIAL'
;
--
error
ER_DUP_ENTRY
alter
table
t2
engine
=
rocksdb
;
...
...
storage/rocksdb/mysql-test/rocksdb/t/unique_sec.test
View file @
0ab7cb23
--
source
include
/
have_rocksdb
.
inc
--
source
include
/
have_partition
.
inc
let
ddl
=
$MYSQL_TMP_DIR
/
unique_sec
.
sql
;
--
exec
sed
s
/
##CF##//g
suite
/rocksdb/t/unique_sec.inc > $ddl
--
exec
sed
s
/
##CF##//g
../storage/rocksdb/mysql-test
/rocksdb/t/unique_sec.inc > $ddl
--
source
$ddl
--
echo
#
...
...
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