During the PerconaLive conference in Amsterdam, I attended a
session where I heard a good piece of advice about using GTID. It
amounts to: look at SHOW SLAVE STATUS output, and if you see more
than one line in the Executed_Gtid_Set field, this tells you
immediately if someone has written on a slave database.
This is good advice. Let's dissect it. Here is what a regular
slave looks like, when nobody has messed up with it:
SHOW SLAVE STATUS\G
*************************** 1. row ***************************
[...]
Master_Server_Id: 1
Master_UUID: 00013454-1111-1111-1111-111111111111
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for more …[Read more]