diff options
Diffstat (limited to 'mysql-test/suite/rpl/r/parallel_backup.result')
-rw-r--r-- | mysql-test/suite/rpl/r/parallel_backup.result | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/parallel_backup.result b/mysql-test/suite/rpl/r/parallel_backup.result index 9d394a220d5..7cf72ed15e4 100644 --- a/mysql-test/suite/rpl/r/parallel_backup.result +++ b/mysql-test/suite/rpl/r/parallel_backup.result @@ -8,6 +8,8 @@ connection master; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = innodb; INSERT INTO t1 VALUES(100); connection slave; +call mtr.add_suppression("Deadlock found when trying to get lock"); +call mtr.add_suppression("Commit failed due to failure of an earlier commit"); include/stop_slave.inc SET @old_parallel_threads= @@GLOBAL.slave_parallel_threads; SET @old_parallel_mode = @@GLOBAL.slave_parallel_mode; @@ -31,6 +33,167 @@ connection backup_slave; BACKUP STAGE END; connection slave; include/diff_tables.inc [master:t1,slave:t1] +# MDEV-30423: dealock XA COMMIT vs BACKUP +# +# Normal XA COMMIT +connection slave; +include/stop_slave.inc +connection master; +connection aux_slave; +BEGIN; +INSERT INTO t1 VALUES (102); +connection master; +XA START '1'; +INSERT INTO t1 VALUES (101); +XA END '1'; +XA PREPARE '1'; +connection master1; +INSERT INTO t1 VALUES (102); +connection master; +XA COMMIT '1'; +include/save_master_gtid.inc +connection slave; +include/start_slave.inc +connection aux_slave; +# Xid '1' must be in the output: +XA RECOVER; +formatID gtrid_length bqual_length data +1 1 0 1 +connection backup_slave; +BACKUP STAGE START; +BACKUP STAGE BLOCK_COMMIT; +connection aux_slave; +ROLLBACK; +connection backup_slave; +BACKUP STAGE END; +connection slave; +include/sync_with_master_gtid.inc +include/stop_slave.inc +# +# Normal XA ROLLBACK +connection slave; +include/stop_slave.inc +Warnings: +Note 1255 Slave already has been stopped +connection master; +connection aux_slave; +BEGIN; +INSERT INTO t1 VALUES (104); +connection master; +XA START '1'; +INSERT INTO t1 VALUES (103); +XA END '1'; +XA PREPARE '1'; +connection master1; +INSERT INTO t1 VALUES (104); +connection master; +XA ROLLBACK '1'; +include/save_master_gtid.inc +connection slave; +include/start_slave.inc +connection aux_slave; +# Xid '1' must be in the output: +XA RECOVER; +formatID gtrid_length bqual_length data +1 1 0 1 +connection backup_slave; +BACKUP STAGE START; +BACKUP STAGE BLOCK_COMMIT; +connection aux_slave; +ROLLBACK; +connection backup_slave; +BACKUP STAGE END; +connection slave; +include/sync_with_master_gtid.inc +include/stop_slave.inc +# +# Errored out XA COMMIT +connection slave; +include/stop_slave.inc +Warnings: +Note 1255 Slave already has been stopped +connection master; +connection aux_slave; +BEGIN; +INSERT INTO t1 VALUES (106); +connection master; +XA START '1'; +INSERT INTO t1 VALUES (105); +XA END '1'; +XA PREPARE '1'; +connection master1; +INSERT INTO t1 VALUES (106); +connection master; +XA COMMIT '1'; +include/save_master_gtid.inc +connection slave; +SET @sav_innodb_lock_wait_timeout = @@global.innodb_lock_wait_timeout; +SET @sav_slave_transaction_retries = @@global.slave_transaction_retries; +SET @@global.innodb_lock_wait_timeout =1; +SET @@global.slave_transaction_retries=0; +include/start_slave.inc +connection aux_slave; +# Xid '1' must be in the output: +XA RECOVER; +formatID gtrid_length bqual_length data +1 1 0 1 +connection backup_slave; +BACKUP STAGE START; +BACKUP STAGE BLOCK_COMMIT; +connection aux_slave; +ROLLBACK; +connection backup_slave; +BACKUP STAGE END; +connection slave; +include/stop_slave.inc +SET @@global.innodb_lock_wait_timeout = @sav_innodb_lock_wait_timeout; +SET @@global.slave_transaction_retries= @sav_slave_transaction_retries; +connection slave; +include/start_slave.inc +include/sync_with_master_gtid.inc +# +# Errored out XA ROLLBACK +connection slave; +include/stop_slave.inc +connection master; +connection aux_slave; +BEGIN; +INSERT INTO t1 VALUES (108); +connection master; +XA START '1'; +INSERT INTO t1 VALUES (107); +XA END '1'; +XA PREPARE '1'; +connection master1; +INSERT INTO t1 VALUES (108); +connection master; +XA ROLLBACK '1'; +include/save_master_gtid.inc +connection slave; +SET @sav_innodb_lock_wait_timeout = @@global.innodb_lock_wait_timeout; +SET @sav_slave_transaction_retries = @@global.slave_transaction_retries; +SET @@global.innodb_lock_wait_timeout =1; +SET @@global.slave_transaction_retries=0; +include/start_slave.inc +connection aux_slave; +# Xid '1' must be in the output: +XA RECOVER; +formatID gtrid_length bqual_length data +1 1 0 1 +connection backup_slave; +BACKUP STAGE START; +BACKUP STAGE BLOCK_COMMIT; +connection aux_slave; +ROLLBACK; +connection backup_slave; +BACKUP STAGE END; +connection slave; +include/stop_slave.inc +SET @@global.innodb_lock_wait_timeout = @sav_innodb_lock_wait_timeout; +SET @@global.slave_transaction_retries= @sav_slave_transaction_retries; +connection slave; +include/start_slave.inc +include/sync_with_master_gtid.inc connection slave; include/stop_slave.inc SET @@global.slave_parallel_threads= @old_parallel_threads; |