Description:
This error:
Error reading packet from server: The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires. (server_errno=1236)
is far to ambiguous and in this case is NOT correct.
How to repeat:
ON MASTER:
SHOW GLOBAL VARIABLES LIKE 'gtid_executed';
69cf02cd-1731-11e3-9a19-002590854928:1-549640578,
708bb615-d393-11e3-a682-003048c3ab22:1-746146807,
819c985c-d384-11e3-a621-00259002979a:1-211578613,
9204e764-d379-11e3-a5d9-0013726268ea:1-353751195
SHOW GLOBAL VARIABLES LIKE 'gtid_purged';
69cf02cd-1731-11e3-9a19-002590854928:1-544950871,
708bb615-d393-11e3-a682-003048c3ab22:1-733901119,
819c985c-d384-11e3-a621-00259002979a:1-210500509,
9204e764-d379-11e3-a5d9-0013726268ea:1-346637731
ON SLAVE:
SHOW GLOBAL VARIABLES LIKE 'gtid_executed';
69cf02cd-1731-11e3-9a19-002590854928:1-549632948,
708bb615-d393-11e3-a682-003048c3ab22:1-746118188,
819c985c-d384-11e3-a621-00259002979a:1-211578558,
9204e764-d379-11e3-a5d9-0013726268ea:1-353710321
SHOW GLOBAL VARIABLES LIKE 'gtid_purged';
69cf02cd-1731-11e3-9a19-002590854928:1-549632948,
708bb615-d393-11e3-a682-003048c3ab22:1-746118188,
819c985c-d384-11e3-a621-00259002979a:1-211578558,
9204e764-d379-11e3-a5d9-0013726268ea:1-353710321
Consolidation the information here:
MASTER MASTER HAS IN BINLOGS SLAVE HAS EXECUTED
69cf02cd-1731-11e3-9a19-002590854928: 544950872-549640578 1-549632948
708bb615-d393-11e3-a682-003048c3ab22: 733901120-746146807 1-746118188
819c985c-d384-11e3-a621-00259002979a: 210500510-211578613 1-211578558
9204e764-d379-11e3-a5d9-0013726268ea: 346637732-353751195 1-353710321
Please explain to me WHAT GTID IS MISSING on the MASTER that the SLAVE cannot download and execute?
I do not see a single GTID needed by the SLAVE that has been purged by the MASTER.
So this error is erroneous. It does not correctly state the problem.
What is the REAL PROBLEM? Most likely the slave connect logic.
Suggested fix:
Revisit the GTID slave connect logic.
As it stands now, I have to rebuild the slave from scratch because I cannot get passed this erroneous error.