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
c6a6c02e
Commit
c6a6c02e
authored
Jan 29, 2018
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create rocksdb_rpl.mdev12179 by taking tokudb_rpl.mdev12179 and adjusting it
parent
0bbd2991
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
497 additions
and
0 deletions
+497
-0
storage/rocksdb/mysql-test/rocksdb_rpl/r/mdev12179.result
storage/rocksdb/mysql-test/rocksdb_rpl/r/mdev12179.result
+265
-0
storage/rocksdb/mysql-test/rocksdb_rpl/t/mdev12179.test
storage/rocksdb/mysql-test/rocksdb_rpl/t/mdev12179.test
+232
-0
No files found.
storage/rocksdb/mysql-test/rocksdb_rpl/r/mdev12179.result
0 → 100644
View file @
c6a6c02e
include/master-slave.inc
[connection master]
connection server_2;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid=slave_pos;
SET sql_log_bin=0;
CREATE TABLE mysql.gtid_slave_pos_innodb LIKE mysql.gtid_slave_pos;
ALTER TABLE mysql.gtid_slave_pos_innodb ENGINE=InnoDB;
CREATE TABLE mysql.gtid_slave_pos_rocksdb LIKE mysql.gtid_slave_pos;
ALTER TABLE mysql.gtid_slave_pos_rocksdb ENGINE=rocksdb;
CREATE TABLE mysql.gtid_slave_pos_myisam_redundant LIKE mysql.gtid_slave_pos;
CREATE TABLE mysql.gtid_slave_pos_innodb_redundant LIKE mysql.gtid_slave_pos;
ALTER TABLE mysql.gtid_slave_pos_innodb_redundant ENGINE=InnoDB;
call mtr.add_suppression("Ignoring redundant table.*since.*has the same storage engine");
include/start_slave.inc
connection server_1;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=MyISAM;
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t3 (a INT PRIMARY KEY) ENGINE=rocksdb;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
INSERT INTO t3 VALUES (1);
SELECT * FROM t1 ORDER BY a;
a
1
SELECT * FROM t2 ORDER BY a;
a
1
SELECT * FROM t3 ORDER BY a;
a
1
connection server_2;
SELECT * FROM t1 ORDER BY a;
a
1
SELECT * FROM t2 ORDER BY a;
a
1
SELECT * FROM t3 ORDER BY a;
a
1
SELECT * FROM mysql.gtid_slave_pos ORDER BY sub_id;
domain_id sub_id server_id seq_no
0 3 1 3
0 4 1 4
SELECT * FROM ( SELECT * FROM mysql.gtid_slave_pos_innodb
UNION ALL SELECT * FROM mysql.gtid_slave_pos_innodb_redundant) inner_select
ORDER BY sub_id;
domain_id sub_id server_id seq_no
0 5 1 5
SELECT * FROM mysql.gtid_slave_pos_rocksdb ORDER BY sub_id;
domain_id sub_id server_id seq_no
0 6 1 6
connection server_2;
FLUSH NO_WRITE_TO_BINLOG STATUS;
SET sql_log_bin=0;
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 0
INSERT INTO t1 VALUES (100);
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 0
INSERT INTO t2 VALUES (101);
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 0
INSERT INTO t3 VALUES (101);
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 0
BEGIN;
INSERT INTO t3 VALUES (102);
INSERT INTO t2 VALUES (103);
COMMIT;
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 1
BEGIN;
INSERT INTO t2 VALUES (104);
INSERT INTO t3 VALUES (105);
COMMIT;
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 2
UPDATE t2, t3 SET t2.a=106, t3.a=107 WHERE t2.a=104 AND t3.a=105;
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 3
SET sql_log_bin=1;
INSERT INTO t1 VALUES (200);
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 3
INSERT INTO t2 VALUES (201);
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 3
INSERT INTO t3 VALUES (201);
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 3
BEGIN;
INSERT INTO t3 VALUES (202);
INSERT INTO t2 VALUES (203);
COMMIT;
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 4
BEGIN;
INSERT INTO t2 VALUES (204);
INSERT INTO t3 VALUES (205);
COMMIT;
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 5
UPDATE t2, t3 SET t2.a=206, t3.a=207 WHERE t2.a=204 AND t3.a=205;
SHOW STATUS LIKE "Transactions_multi_engine";
Variable_name Value
Transactions_multi_engine 6
DELETE FROM t1 WHERE a >= 100;
DELETE FROM t2 WHERE a >= 100;
DELETE FROM t3 WHERE a >= 100;
connection server_2;
include/stop_slave.inc
SET sql_log_bin=0;
DROP TABLE mysql.gtid_slave_pos_rocksdb;
DROP TABLE mysql.gtid_slave_pos_myisam_redundant;
DROP TABLE mysql.gtid_slave_pos_innodb_redundant;
SET sql_log_bin=1;
FLUSH NO_WRITE_TO_BINLOG STATUS;
include/start_slave.inc
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 0
Transactions_gtid_foreign_engine 0
Transactions_multi_engine 0
connection server_1;
INSERT INTO t1 VALUES (100);
connection server_2;
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 0
Transactions_gtid_foreign_engine 0
Transactions_multi_engine 0
connection server_1;
INSERT INTO t2 VALUES (101);
connection server_2;
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 0
Transactions_gtid_foreign_engine 0
Transactions_multi_engine 0
connection server_1;
INSERT INTO t3 VALUES (101);
connection server_2;
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 0
Transactions_gtid_foreign_engine 1
Transactions_multi_engine 0
connection server_1;
BEGIN;
INSERT INTO t3 VALUES (102);
INSERT INTO t2 VALUES (103);
COMMIT;
connection server_2;
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 1
Transactions_gtid_foreign_engine 1
Transactions_multi_engine 1
connection server_1;
BEGIN;
INSERT INTO t2 VALUES (104);
INSERT INTO t3 VALUES (105);
COMMIT;
connection server_2;
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 2
Transactions_gtid_foreign_engine 1
Transactions_multi_engine 2
connection server_1;
UPDATE t2, t3 SET t2.a=106, t3.a=107 WHERE t2.a=104 AND t3.a=105;
connection server_2;
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 3
Transactions_gtid_foreign_engine 1
Transactions_multi_engine 3
connection server_2;
connection server_2;
SHOW VARIABLES LIKE 'log_bin';
Variable_name Value
log_bin OFF
include/start_slave.inc
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 0
Transactions_gtid_foreign_engine 0
Transactions_multi_engine 0
connection server_1;
INSERT INTO t1 VALUES (200);
connection server_2;
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 0
Transactions_gtid_foreign_engine 0
Transactions_multi_engine 0
connection server_1;
INSERT INTO t2 VALUES (201);
connection server_2;
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 0
Transactions_gtid_foreign_engine 0
Transactions_multi_engine 0
connection server_1;
INSERT INTO t3 VALUES (201);
connection server_2;
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 0
Transactions_gtid_foreign_engine 1
Transactions_multi_engine 0
connection server_1;
BEGIN;
INSERT INTO t3 VALUES (202);
INSERT INTO t2 VALUES (203);
COMMIT;
connection server_2;
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 1
Transactions_gtid_foreign_engine 1
Transactions_multi_engine 1
connection server_1;
BEGIN;
INSERT INTO t2 VALUES (204);
INSERT INTO t3 VALUES (205);
COMMIT;
connection server_2;
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 2
Transactions_gtid_foreign_engine 1
Transactions_multi_engine 2
connection server_1;
UPDATE t2, t3 SET t2.a=206, t3.a=207 WHERE t2.a=204 AND t3.a=205;
connection server_2;
SHOW STATUS LIKE "%transactions%engine";
Variable_name Value
Rpl_transactions_multi_engine 3
Transactions_gtid_foreign_engine 1
Transactions_multi_engine 3
connection server_2;
SET sql_log_bin=0;
DROP TABLE mysql.gtid_slave_pos_innodb;
SET sql_log_bin=1;
connection server_1;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
include/rpl_end.inc
storage/rocksdb/mysql-test/rocksdb_rpl/t/mdev12179.test
0 → 100644
View file @
c6a6c02e
--
source
include
/
have_rocksdb
.
inc
--
source
include
/
have_innodb
.
inc
--
source
include
/
master
-
slave
.
inc
--
connection
server_2
--
source
include
/
stop_slave
.
inc
CHANGE
MASTER
TO
master_use_gtid
=
slave_pos
;
SET
sql_log_bin
=
0
;
CREATE
TABLE
mysql
.
gtid_slave_pos_innodb
LIKE
mysql
.
gtid_slave_pos
;
ALTER
TABLE
mysql
.
gtid_slave_pos_innodb
ENGINE
=
InnoDB
;
CREATE
TABLE
mysql
.
gtid_slave_pos_rocksdb
LIKE
mysql
.
gtid_slave_pos
;
ALTER
TABLE
mysql
.
gtid_slave_pos_rocksdb
ENGINE
=
rocksdb
;
CREATE
TABLE
mysql
.
gtid_slave_pos_myisam_redundant
LIKE
mysql
.
gtid_slave_pos
;
CREATE
TABLE
mysql
.
gtid_slave_pos_innodb_redundant
LIKE
mysql
.
gtid_slave_pos
;
ALTER
TABLE
mysql
.
gtid_slave_pos_innodb_redundant
ENGINE
=
InnoDB
;
call
mtr
.
add_suppression
(
"Ignoring redundant table.*since.*has the same storage engine"
);
--
source
include
/
start_slave
.
inc
--
connection
server_1
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
)
ENGINE
=
MyISAM
;
CREATE
TABLE
t2
(
a
INT
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
CREATE
TABLE
t3
(
a
INT
PRIMARY
KEY
)
ENGINE
=
rocksdb
;
INSERT
INTO
t1
VALUES
(
1
);
INSERT
INTO
t2
VALUES
(
1
);
INSERT
INTO
t3
VALUES
(
1
);
SELECT
*
FROM
t1
ORDER
BY
a
;
SELECT
*
FROM
t2
ORDER
BY
a
;
SELECT
*
FROM
t3
ORDER
BY
a
;
--
save_master_pos
--
connection
server_2
--
sync_with_master
SELECT
*
FROM
t1
ORDER
BY
a
;
SELECT
*
FROM
t2
ORDER
BY
a
;
SELECT
*
FROM
t3
ORDER
BY
a
;
SELECT
*
FROM
mysql
.
gtid_slave_pos
ORDER
BY
sub_id
;
SELECT
*
FROM
(
SELECT
*
FROM
mysql
.
gtid_slave_pos_innodb
UNION
ALL
SELECT
*
FROM
mysql
.
gtid_slave_pos_innodb_redundant
)
inner_select
ORDER
BY
sub_id
;
SELECT
*
FROM
mysql
.
gtid_slave_pos_rocksdb
ORDER
BY
sub_id
;
# Test status variable Transactions_multi_engine.
--
connection
server_2
FLUSH
NO_WRITE_TO_BINLOG
STATUS
;
SET
sql_log_bin
=
0
;
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
INSERT
INTO
t1
VALUES
(
100
);
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
INSERT
INTO
t2
VALUES
(
101
);
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
INSERT
INTO
t3
VALUES
(
101
);
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
BEGIN
;
INSERT
INTO
t3
VALUES
(
102
);
INSERT
INTO
t2
VALUES
(
103
);
COMMIT
;
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
BEGIN
;
INSERT
INTO
t2
VALUES
(
104
);
INSERT
INTO
t3
VALUES
(
105
);
COMMIT
;
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
UPDATE
t2
,
t3
SET
t2
.
a
=
106
,
t3
.
a
=
107
WHERE
t2
.
a
=
104
AND
t3
.
a
=
105
;
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
# Try again with binlog enabled.
SET
sql_log_bin
=
1
;
INSERT
INTO
t1
VALUES
(
200
);
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
INSERT
INTO
t2
VALUES
(
201
);
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
INSERT
INTO
t3
VALUES
(
201
);
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
BEGIN
;
INSERT
INTO
t3
VALUES
(
202
);
INSERT
INTO
t2
VALUES
(
203
);
COMMIT
;
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
BEGIN
;
INSERT
INTO
t2
VALUES
(
204
);
INSERT
INTO
t3
VALUES
(
205
);
COMMIT
;
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
UPDATE
t2
,
t3
SET
t2
.
a
=
206
,
t3
.
a
=
207
WHERE
t2
.
a
=
204
AND
t3
.
a
=
205
;
SHOW
STATUS
LIKE
"Transactions_multi_engine"
;
DELETE
FROM
t1
WHERE
a
>=
100
;
DELETE
FROM
t2
WHERE
a
>=
100
;
DELETE
FROM
t3
WHERE
a
>=
100
;
# Test status variables Rpl_transactions_multi_engine and Transactions_gtid_foreign_engine.
# Have mysql.gtid_slave_pos* for myisam and innodb but not rocksdb.
--
connection
server_2
--
source
include
/
stop_slave
.
inc
SET
sql_log_bin
=
0
;
DROP
TABLE
mysql
.
gtid_slave_pos_rocksdb
;
DROP
TABLE
mysql
.
gtid_slave_pos_myisam_redundant
;
DROP
TABLE
mysql
.
gtid_slave_pos_innodb_redundant
;
SET
sql_log_bin
=
1
;
FLUSH
NO_WRITE_TO_BINLOG
STATUS
;
--
source
include
/
start_slave
.
inc
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_1
INSERT
INTO
t1
VALUES
(
100
);
--
save_master_pos
--
connection
server_2
--
sync_with_master
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_1
INSERT
INTO
t2
VALUES
(
101
);
--
save_master_pos
--
connection
server_2
--
sync_with_master
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_1
INSERT
INTO
t3
VALUES
(
101
);
--
save_master_pos
--
connection
server_2
--
sync_with_master
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_1
BEGIN
;
INSERT
INTO
t3
VALUES
(
102
);
INSERT
INTO
t2
VALUES
(
103
);
COMMIT
;
--
save_master_pos
--
connection
server_2
--
sync_with_master
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_1
BEGIN
;
INSERT
INTO
t2
VALUES
(
104
);
INSERT
INTO
t3
VALUES
(
105
);
COMMIT
;
--
save_master_pos
--
connection
server_2
--
sync_with_master
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_1
UPDATE
t2
,
t3
SET
t2
.
a
=
106
,
t3
.
a
=
107
WHERE
t2
.
a
=
104
AND
t3
.
a
=
105
;
--
save_master_pos
--
connection
server_2
--
sync_with_master
SHOW
STATUS
LIKE
"%transactions%engine"
;
# Now the same thing, but without binlogging on the slave.
--
connection
server_2
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
wait
EOF
--
shutdown_server
30
--
source
include
/
wait_until_disconnected
.
inc
# Restart without binary log.
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
restart
:
--
skip
-
log
-
bin
EOF
--
connection
server_2
--
enable_reconnect
--
source
include
/
wait_until_connected_again
.
inc
SHOW
VARIABLES
LIKE
'log_bin'
;
--
source
include
/
start_slave
.
inc
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_1
INSERT
INTO
t1
VALUES
(
200
);
--
save_master_pos
--
connection
server_2
--
sync_with_master
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_1
INSERT
INTO
t2
VALUES
(
201
);
--
save_master_pos
--
connection
server_2
--
sync_with_master
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_1
INSERT
INTO
t3
VALUES
(
201
);
--
save_master_pos
--
connection
server_2
--
sync_with_master
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_1
BEGIN
;
INSERT
INTO
t3
VALUES
(
202
);
INSERT
INTO
t2
VALUES
(
203
);
COMMIT
;
--
save_master_pos
--
connection
server_2
--
sync_with_master
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_1
BEGIN
;
INSERT
INTO
t2
VALUES
(
204
);
INSERT
INTO
t3
VALUES
(
205
);
COMMIT
;
--
save_master_pos
--
connection
server_2
--
sync_with_master
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_1
UPDATE
t2
,
t3
SET
t2
.
a
=
206
,
t3
.
a
=
207
WHERE
t2
.
a
=
204
AND
t3
.
a
=
205
;
--
save_master_pos
--
connection
server_2
--
sync_with_master
SHOW
STATUS
LIKE
"%transactions%engine"
;
--
connection
server_2
SET
sql_log_bin
=
0
;
DROP
TABLE
mysql
.
gtid_slave_pos_innodb
;
SET
sql_log_bin
=
1
;
--
connection
server_1
DROP
TABLE
t1
;
DROP
TABLE
t2
;
DROP
TABLE
t3
;
--
source
include
/
rpl_end
.
inc
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