Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anonymous transactions get made even with GTID_MODE=ON

I'm using MySQL 5.7 with GTID master-master replication and I'm experiencing a strange error.

Randomly one of my masters will stop replicating with: "Cannot replicate anonymous transaction when @@GLOBAL.GTID_MODE = ON"

When I check there is indeed an anonymous entry in the binlog, but what isn't clear is how it got there since the other master also has GTID_MODE=ON and that should not allow any Anonymous transactions to execute or make their way in to the binlog.

enforce_gtid_consistency is also ON so queries that would result in an Anonymous transaction should be failing.

It's also only ever a single query/transaction. The previous and next queries in the binlog always have GTID's.

like image 579
Nick Avatar asked Sep 08 '25 06:09

Nick


1 Answers

I ran into this same issue. The first time I saw it was when I upgraded to mysql 5.7.12.

I don't have a workaround/fix yet either. What version of mysql are you on?

like image 75
Scott Nebor Avatar answered Sep 10 '25 05:09

Scott Nebor