mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge tag 'mariadb-5.5.59' into 5.5-galera
This commit is contained in:
@@ -1011,6 +1011,30 @@ typedef struct st_xid_state {
|
||||
bool in_thd;
|
||||
/* Error reported by the Resource Manager (RM) to the Transaction Manager. */
|
||||
uint rm_error;
|
||||
|
||||
/**
|
||||
Check that XA transaction has an uncommitted work. Report an error
|
||||
to the user in case when there is an uncommitted work for XA transaction.
|
||||
|
||||
@return result of check
|
||||
@retval false XA transaction is NOT in state IDLE, PREPARED
|
||||
or ROLLBACK_ONLY.
|
||||
@retval true XA transaction is in state IDLE or PREPARED
|
||||
or ROLLBACK_ONLY.
|
||||
*/
|
||||
|
||||
bool check_has_uncommitted_xa() const
|
||||
{
|
||||
if (xa_state == XA_IDLE ||
|
||||
xa_state == XA_PREPARED ||
|
||||
xa_state == XA_ROLLBACK_ONLY)
|
||||
{
|
||||
my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} XID_STATE;
|
||||
|
||||
extern mysql_mutex_t LOCK_xid_cache;
|
||||
|
||||
Reference in New Issue
Block a user