summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/r/parallel_backup.result
blob: 9d394a220d57ffbe9c750b06ae6b8542d8c1cf78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
include/master-slave.inc
[connection master]
#
# MDEV-21953: deadlock between BACKUP STAGE BLOCK_COMMIT and parallel
# replication
#
connection master;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = innodb;
INSERT INTO t1 VALUES(100);
connection slave;
include/stop_slave.inc
SET @old_parallel_threads= @@GLOBAL.slave_parallel_threads;
SET @old_parallel_mode   = @@GLOBAL.slave_parallel_mode;
SET @@global.slave_parallel_threads= 2;
SET @@global.slave_parallel_mode   = 'optimistic';
connection master;
INSERT INTO  t1 VALUES (1);
INSERT INTO  t1 VALUES (2);
connect  aux_slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
BEGIN;
INSERT INTO t1 VALUES (1);
connection slave;
include/start_slave.inc
connection aux_slave;
connect  backup_slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
BACKUP STAGE START;
BACKUP STAGE BLOCK_COMMIT;
connection aux_slave;
ROLLBACK;
connection backup_slave;
BACKUP STAGE END;
connection slave;
include/diff_tables.inc [master:t1,slave:t1]
connection slave;
include/stop_slave.inc
SET @@global.slave_parallel_threads= @old_parallel_threads;
SET @@global.slave_parallel_mode   = @old_parallel_mode;
include/start_slave.inc
connection server_1;
DROP TABLE t1;
include/rpl_end.inc