Hi, Davi!
On Oct 20, Davi Arnaut wrote:
> 2708 Davi Arnaut 2008-10-20
> 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.
good!
ok to push with one change:
> === modified file 'sql/sql_parse.cc'
> --- a/sql/sql_parse.cc 2008-10-15 10:06:44 +0000
> +++ b/sql/sql_parse.cc 2008-10-20 18:44:33 +0000
> @@ -5110,6 +5161,12 @@ create_sp_error:
> my_error(ER_XAER_NOTA, MYF(0));
> break;
> }
> + if (xa_trans_rolled_back(&thd->transaction.xid_state))
> + {
> + xid_cache_delete(&thd->transaction.xid_state);
> + thd->transaction.xid_state.xa_state= XA_NOTR;
> + thd->transaction.xid_state.rm_error= 0;
> + }
> if (ha_prepare(thd))
Remove this chunk, as discussed on irc, it's not needed in XA PREPARE.
Regards / Mit vielen Grüßen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Häring