> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/clientserver-protocol/replication-protocol/xa_prepare_log_event.md).

# XA\_PREPARE\_LOG\_EVENT

An `XA_PREPARE_LOG_EVENT` records the prepare phase of a distributed transaction using the XA log. It is used to ensure atomicity and consistency of transactions.

## Header

* Event Type is `XA_PREPARE_LOG_EVENT` (`0x26`).

## Fields

* [uint<1>](/docs/server/reference/clientserver-protocol/protocol-data-types.md#fixed-length-integers) One Phase Commit.
* [uint<4>](/docs/server/reference/clientserver-protocol/protocol-data-types.md#fixed-length-integers) Format ID.
* [uint<4>](/docs/server/reference/clientserver-protocol/protocol-data-types.md#fixed-length-integers) Length of gtrid.
* [uint<1>](/docs/server/reference/clientserver-protocol/protocol-data-types.md#fixed-length-integers) Length of bqual.

Payload:

* [byte\<n>](/docs/server/reference/clientserver-protocol/protocol-data-types.md#fixed-length-bytes) xid, where n is sum of gtrid and bqual lengths.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
