Prepare with message
Associates a message (byte data) with the prepared transaction.This information is stored in RDB$TRANSACTIONS and can be used for recovery purposes.
Client
Int32—p_operation-
Operation code (
op_prepare2—51) Int32—p_prep_transaction-
Transaction handle
Buffer—p_prep_data-
Recovery information
Server
Reconnect transaction
Reconnects a prepared (“in-limbo”) transaction for 2-phase commit or rollback.
This operation can be used for recovery operations if a connection was closed or killed after preparing a transaction, but not yet committing or rolling it back.
Client
Int32—p_operation-
Operation code (
op_reconnect—33) Int32—p_sttr_database-
Unused, always use
0 Buffer—p_sttr_tpb-
Transaction id to reconnect, encoded in little-endian.
For Firebird 2.5 and lower, always 4 bytes (
Int32little-endian).For Firebird 3.0 and higher, transaction ids greater than 0x7FFF_FFFF (231 - 1) must be encoded in 8 bytes (
Int64little-endian), while smaller ids may be encoded in 4 bytes (Int32little-endian).This encoding is atypical, as it’s essentially a transaction parameter buffer without version or item tags.
Server
[wireprotocol-responses-generic] — on success, p_resp_object holds the transaction handle.
Deviations for protocol version 11
Request flushing and response processing can be deferred.
If ptype_batch_send or higher is used, other transaction operations can be sent immediately after reconnecting the transaction.They can use the invalid object handle (0xFFFF) instead of the — not yet received — transaction handle.