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.