MySQL 9.0.0
Source Code Documentation
|
Functions | |
bool | commit_detached_by_xid (THD *thd, bool run_after_commit=true) |
Commits detached XA transaction by XID in all storage engines. More... | |
bool | rollback_detached_by_xid (THD *thd) |
Rolls back detached XA transaction by XID in all storage engines. More... | |
bool | commit_in_engines (THD *thd, bool all=false, bool run_after_commit=true) |
Commits the underlying transaction in storage engines. More... | |
bool | rollback_in_engines (THD *thd, bool all=false) |
Rolls back the underlying transaction in storage engines. More... | |
int | set_prepared_in_tc_in_engines (THD *thd, bool all=false) |
Marks the underlying transaction as PREPARED_IN_TC in storage engines. More... | |
bool | should_statement_set_prepared_in_tc (THD *thd) |
Checks whether or not the underlying statement should trigger setting the transaction to PREPARED_IN_TC state. More... | |
bool trx_coordinator::commit_detached_by_xid | ( | THD * | thd, |
bool | run_after_commit = true |
||
) |
Commits detached XA transaction by XID in all storage engines.
thd | The THD session object holding the detached XA/XID. |
run_after_commit | True by default, otherwise, does not execute the after_commit hook in the function. |
bool trx_coordinator::commit_in_engines | ( | THD * | thd, |
bool | all = false , |
||
bool | run_after_commit = true |
||
) |
Commits the underlying transaction in storage engines.
Determines if the transaction to commit is attached to the thd
parameter or, instead, the thd
parameter holds the XID for a detached transaction to be committed.
thd | THD session object. |
all | Is set in case of explicit commit (COMMIT statement), or implicit commit issued by DDL. Is not set when called at the end of statement, even if autocommit=1. |
run_after_commit | True by default, otherwise, does not execute the after_commit hook in the function. |
bool trx_coordinator::rollback_detached_by_xid | ( | THD * | thd | ) |
Rolls back detached XA transaction by XID in all storage engines.
thd | The THD session object holding the detached XA/XID. |
bool trx_coordinator::rollback_in_engines | ( | THD * | thd, |
bool | all = false |
||
) |
Rolls back the underlying transaction in storage engines.
Determines if the transaction to rollback is attached to the thd
parameter or, instead, the thd
parameter holds the XID for a detached transaction to be rolled back.
thd | THD session object. |
all | Is set in case of explicit commit (COMMIT statement), or implicit commit issued by DDL. Is not set when called at the end of statement, even if autocommit=1. |
int trx_coordinator::set_prepared_in_tc_in_engines | ( | THD * | thd, |
bool | all = false |
||
) |
Marks the underlying transaction as PREPARED_IN_TC
in storage engines.
The underlying executing statement is tested in order to understand if the transaction should be marked. The accepted statements are:
thd | THD session object. |
all | Is set in case of explicit commit (COMMIT statement), or implicit commit issued by DDL. Is not set when called at the end of statement, even if autocommit=1. |
PREPARED_IN_TC
in storage engines, error code otherwise. bool trx_coordinator::should_statement_set_prepared_in_tc | ( | THD * | thd | ) |
Checks whether or not the underlying statement should trigger setting the transaction to PREPARED_IN_TC
state.
The accepted statemets are:
thd | THD session object. |
PREPARED_IN_TC
, false if not