mariadb/storage/innobase/trx
Kristian Nielsen 52a4a852bb Binlog-in-engine: Initial support for 2pc and XA
At XA PREPARE, spill all events (including COMMIT end event) as OOB, and
call into the engine to binlog a PREPARE record. Store the OOB reference
along with the XID in an engine-binlog internal hash.

At XA COMMIT, fetch the OOB reference from the internal hash and put it into
a COMMIT record for the transaction.

For both user XA and internal two-phase commit between binlog and
other storage engine, write the XID into an XA complete event in the
same mtr as the commit record. This record will be later used to be
able to consistently recover (commit or rollback) prepared
transactions in the other engines, depending on whether binlog write
became durable before the crash or not.

At XA ROLLBACK, merely put in an XA complete event.

Maintain reference counts for prending prepared XA transactions, and
for pending two-phase commit records, to make sure binlog files
containing these will not be purged while those transactions are
active.

Implement the necessary "unlog" mechanisms so that the reference
counts can be released only after all other participating engines have
durably committed (respectively XA prepared/rolled back) their part of
the transaction.

This commit does not handle XA/binlog crash recovery, will come in a later
patch.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-01-16 23:05:04 +01:00
..
trx0i_s.cc MDEV-37152: Remove many calls to _current_thd() 2025-09-29 14:35:02 +03:00
trx0purge.cc Merge branch '10.11' into 11.4 2025-11-04 13:44:16 +01:00
trx0rec.cc Merge 10.11 into 11.4 2025-10-17 09:05:29 +03:00
trx0roll.cc MDEV-37152: Remove many calls to _current_thd() 2025-09-29 14:35:02 +03:00
trx0rseg.cc MDEV-37152: Remove many calls to _current_thd() 2025-09-29 14:35:02 +03:00
trx0sys.cc Merge branch '10.11' into 11.4 2025-11-04 13:44:16 +01:00
trx0trx.cc Binlog-in-engine: Initial support for 2pc and XA 2026-01-16 23:05:04 +01:00
trx0undo.cc Merge 10.11 into 11.4 2025-11-28 12:56:27 +02:00