mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#45548: XA transaction without access to InnoDB tables crashes the server
The problem is that the one phase commit function failed to properly end a empty transaction. The solution is to ensure that the transaction cleanup procedure is invoked even for empty transactions.
This commit is contained in:
@ -1242,9 +1242,10 @@ int ha_commit_one_phase(THD *thd, bool all)
|
||||
#endif
|
||||
thd->variables.tx_isolation=thd->session_tx_isolation;
|
||||
}
|
||||
if (is_real_trans)
|
||||
thd->transaction.cleanup();
|
||||
}
|
||||
/* Free resources and perform other cleanup even for 'empty' transactions. */
|
||||
if (is_real_trans)
|
||||
thd->transaction.cleanup();
|
||||
#endif /* USING_TRANSACTIONS */
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user