mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-35019 Provide a way to enable "rollback XA on disconnect" behavior we had before 10.5.2
Implement variable legacy_xa_rollback_at_disconnect to support backwards compatibility for applications that rely on the pre-10.5 behavior for connection disconnect, which is to rollback the transaction (in violation of the XA specification). Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
@ -1553,7 +1553,12 @@ void THD::cleanup(void)
|
||||
close_temporary_tables();
|
||||
|
||||
if (transaction->xid_state.is_explicit_XA())
|
||||
trans_xa_detach(this);
|
||||
{
|
||||
if (unlikely(variables.legacy_xa_rollback_at_disconnect))
|
||||
xa_trans_force_rollback(this);
|
||||
else
|
||||
trans_xa_detach(this);
|
||||
}
|
||||
else
|
||||
trans_rollback(this);
|
||||
|
||||
|
Reference in New Issue
Block a user