1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#28323: Server crashed in xid cache operations

The problem was that the server did not robustly handle a
unilateral roll back issued by the Resource Manager (RM)
due to a resource deadlock within the transaction branch.
By not acknowledging the roll back, the server (TM) would
eventually corrupt the XA transaction state and crash.

The solution is to mark the transaction as rollback-only
if the RM indicates that it rolled back its branch of the
transaction.
This commit is contained in:
Davi Arnaut
2008-10-21 16:07:31 -02:00
parent 0b38c93d6e
commit b0d673fc4d
6 changed files with 145 additions and 11 deletions

View File

@@ -817,7 +817,12 @@ int ha_rollback_trans(THD *thd, bool all)
trans->nht=0;
trans->no_2pc=0;
if (is_real_trans)
thd->transaction.xid_state.xid.null();
{
if (thd->transaction_rollback_request)
thd->transaction.xid_state.rm_error= thd->net.last_errno;
else
thd->transaction.xid_state.xid.null();
}
if (all)
{
thd->variables.tx_isolation=thd->session_tx_isolation;