mirror of
https://github.com/MariaDB/server.git
synced 2026-01-29 06:49:08 +01:00
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> |
||
|---|---|---|
| .. | ||
| trx0i_s.cc | ||
| trx0purge.cc | ||
| trx0rec.cc | ||
| trx0roll.cc | ||
| trx0rseg.cc | ||
| trx0sys.cc | ||
| trx0trx.cc | ||
| trx0undo.cc | ||