MySQL 9.1.0
Source Code Documentation
anonymous_namespace{sql_xa_commit.cc} Namespace Reference

Functions

void force_rollback (THD *thd)
 Forces the transaction to be rolled back upon error in the commit process. More...
 

Function Documentation

◆ force_rollback()

void anonymous_namespace{sql_xa_commit.cc}::force_rollback ( THD thd)

Forces the transaction to be rolled back upon error in the commit process.

It, temporarily, changes THD::lex::sql_command to SQLCOM_XA_ROLLBACK so that the executed rollback stack may behave as an actual XA ROLLBACK was issued (log an XA ROLLBACK to the binary log, for instance).

Parameters
thdThe THD session object within which the command is being executed.