mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#43171 - Assertion failed: thd->transaction.xid_state.xid.is_null()
XA START may cause assertion failure/server crash when it is called after unilateral roll back issued by the Resource Manager (both in regular transaction and after XA transaction). The problem was that rm_error variable wasn't set/reset properly.
This commit is contained in:
@ -1311,7 +1311,8 @@ int ha_rollback_trans(THD *thd, bool all)
|
||||
}
|
||||
trans->ha_list= 0;
|
||||
trans->no_2pc=0;
|
||||
if (is_real_trans && thd->transaction_rollback_request)
|
||||
if (is_real_trans && thd->transaction_rollback_request &&
|
||||
thd->transaction.xid_state.xa_state != XA_NOTR)
|
||||
thd->transaction.xid_state.rm_error= thd->main_da.sql_errno();
|
||||
if (all)
|
||||
thd->variables.tx_isolation=thd->session_tx_isolation;
|
||||
|
Reference in New Issue
Block a user