Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL)
-
None
Description
When replicating an XA transaction, if the body of the transaction (XA START through XA PREPARE) runs into an error, but that error is in skip-slave-errors, it won't be be binlogged. The corresponding XA COMMIT, however, will be binlogged without error, leading to an invalid binary log. The following MTR test snippet highlights this:
config file: rpl_bug.cnf
!include ../my.cnf
|
|
[mysqld.2]
|
slave-skip-errors=1032
|
innodb
|
log-slave-updates
|
|
[mysqld.3]
|
innodb
|
|
[ENV]
|
SERVER_MYPORT_1= @mysqld.1.port
|
SERVER_MYPORT_2= @mysqld.2.port
|
SERVER_MYPORT_3= @mysqld.3.port
|
mtr file: rpl_bug.test
--source include/have_innodb.inc
|
--source include/have_binlog_format_row.inc
|
--let $rpl_server_count= 3
|
--let $rpl_topology= 1->2->3
|
--source include/rpl_init.inc
|
|
--echo #
|
--echo # Initialize test data
|
--connection server_1
|
create table t1 (a int) engine=innodb;
|
insert into t1 values (1);
|
insert into t1 values (2);
|
--source include/save_master_gtid.inc
|
|
--connection server_2
|
--source include/sync_with_master_gtid.inc
|
|
--connection server_2
|
set statement SQL_LOG_BIN=0 FOR delete from t1 where a=1;
|
|
--connection server_1
|
xa start '1';
|
update t1 set a=3 where a=1;
|
xa end '1';
|
xa prepare '1';
|
xa commit '1';
|
--source include/save_master_gtid.inc
|
|
--connection server_3
|
--let $slave_sql_errno=1397
|
--source include/wait_for_slave_sql_error.inc
|
--die Hit Error 'XAER_NOTA: Unknown XID' on query
|
|
--echo #
|
--echo # Cleanup
|
--connection server_1
|
DROP TABLE t1;
|
--source include/save_master_gtid.inc
|
|
--connection server_2
|
--source include/sync_with_master_gtid.inc
|
|
--source include/rpl_end.inc
|
|
--echo # End of tests
|
Attachments
Issue Links
- relates to
-
MDEV-25616 Binlog event for XA COMMIT is generated without matching XA START, replication aborts
- Closed