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