← Back to team overview

maria-developers team mailing list archive

How to check for active transaction?

 

Hi Serg,

I'm merging MWL#234 into 5.5.

I have a session variable @@skip_replication. I want to ensure that this
variable is not modified in the middle of a statement or while a transaction
is active.

(The reason for this is that it changes whether changes are replicated or not
- and so changing in the middle of statement or transaction could cause us to
replicate only half of the event/transaction).

In my 5.2-based tree, I had this condition, but this seems to no longer work:

    thd->locked_tables || thd->active_transaction()

Can you help me find how to do this check in 5.5 code base?

 - Kristian.


Follow ups