MDEV-36150 Retain original Xid_log_event in Galera Cluster #490
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this change, Galera overwrote xid used to prepare
a transaction with a xid containing wsrep seqno and UUID.
This however is not fully compatible with partition engine
and atomic DDL recovery.
In order to avoid overwriting xid during prepare, store the
wsrep transaction seqno and UUID into Xid_log_event if the
transaction is wsrep transaction. This way the seqno and UUID
will be available to reconstruct the wsrep XID for commit
during binlog coordinated recovery.
This changes on-disk format of Xid_log_event to contain
additional 24 bytes for wsrep seqno and UUID if the
transaction is wsrep transaction. As Xid_log_event has no
meaning in replication and used only in recovery, the change
is backwards compatible.
The Xid_log_event output in mariadb-binlog is extended to
print also wsrep_seqno and wsrep_uuid if they are set.