Skip to content

Commit

Permalink
MDEV-35660 Assertion `trx->xid.is_null()' failed
Browse files Browse the repository at this point in the history
The assertion fails during wsrep recovery step, in function
innobase_rollback_by_xid(). The transaction's xid is normally
cleared as part of lookup by xid, unless the transaction has
a wsrep specific xid.
This is a regression from MDEV-24035 (commit ddd7d5d)
which removed the part clears xid before rollback for transaction
with a wsrep specific xid.
  • Loading branch information
sciascid committed Dec 19, 2024
1 parent 3f22f5f commit 07b77e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion storage/innobase/handler/ha_innodb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3076,7 +3076,10 @@ static int innobase_rollback_by_xid(handlerton*, XID *xid) noexcept
return XAER_RMFAIL;
if (trx_t *trx= trx_get_trx_by_xid(xid))
{
ut_ad(trx->xid.is_null()); /* should have been cleared by the lookup */
/* Lookup by xid clears the transaction xid.
For wsrep we clear it below. */
ut_ad(trx->xid.is_null() || wsrep_is_wsrep_xid(&trx->xid));
trx->xid.null();
trx_deregister_from_2pc(trx);
THD* thd= trx->mysql_thd;
dberr_t err= trx_rollback_for_mysql(trx);
Expand Down

0 comments on commit 07b77e8

Please sign in to comment.