mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-25616 XA PREPARE event group is not binlogged when..
the only query of the XA transaction is on a non-transactional table errors out: XA BEGIN 'x'; --error ER_DUP_ENTRY INSERT INTO t1 VALUES (1),(1); XA END 'x'; XA PREPARE 'x'; The binlogging pattern is correctly started as expected with the errored-out Query or its ROW format events, but there is no empty XA_prepare_log_event group. The following XA COMMIT 'x'; therefore should not be logged either, but it does. The bug is fixed with proper maintaining of a read-write binlog hton property and use it to enforce correct binlogging decisions. Specifically in the bug description case XA COMMIT won't be binlogged in both when given in the same connection and externally after disconnect. The same continue to apply to an empty XA that do not change any data in all transactional engines involved.
This commit is contained in:
committed by
Andrei
parent
4b4c2b8cc0
commit
42802ad66c
10
mysql-test/suite/rpl/include/rpl_xa_empty_transaction.inc
Normal file
10
mysql-test/suite/rpl/include/rpl_xa_empty_transaction.inc
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Helper file to run each empty-due-to-err XA transaction test case both with
|
||||
# and without detaching from the connection when the transaction is prepared.
|
||||
#
|
||||
|
||||
--let $use_disconnect=0
|
||||
--source rpl_xa_empty_transaction_test_case.inc
|
||||
|
||||
--let $use_disconnect=1
|
||||
--source rpl_xa_empty_transaction_test_case.inc
|
Reference in New Issue
Block a user