To provide semisync master crash-recovery (
MDEV-21117) the same server-id transactions
were made to accept for execution on the semisync slave when the strict gtid
That however caused out-of-order error on a master's transaction
server of the circular setup.
The error was fair in the sense of the gtid strict mode rule as indeed
under the condition of the circular setup the replicated transaction
already exists in the local binlog.
This gets fixed to ignore on the gtid strict mode semisync
slave those gtids that exist in the slave's binlog that effectively restores
the default same-server-id ignore policy on the semisync slave.
At the same time the fixes complies with
MDEV-21117 semisync slave recovery
to accept the same server-id transactions that do not exist in local binlog.