Bug #81398 GTID error needs to provide more information and context
Submitted: 12 May 2016 14:50
Reporter: Simon Mudd (OCA) Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.6.27 OS:Any
Assigned to: CPU Architecture:Any
Tags: 5.6.27, GTID, replication

[12 May 2016 14:50] Simon Mudd
Description:
I move a slave under a different master after setting master_auto_position = 1.
GTID mode is enabled.

I get this message:

2016-05-12 16:36:20 45536 [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)

It's really not very helpful.  It tells me there's a problem but it does not tell me what to do about it.  Additionally we're using GTID yet there's no reference to the appropriate GTID values on the master or the slave to allow me to compare them and figure out what's missing / wrong and therefore how to go about fixing the problem.

How to repeat:
see above.

Suggested fix:
I may be missing stuff but I can see it would be good to show:
1. the master's GTID state
2. the slave's GTID state
3. possibly an indication of the difference.

If possible point to somewhere in the manual hinting on how this might be resolved.

I turned of auto_position and pointed at some "older binlogs" and thus allowed the slave to pull in binlog events and ignore those it had already seen. That's not really the right solution but is a short term work around but if we're going to use GTID it would be good to provide more help.

Also note: still missing: On stopping and starting the SQL thread  please indicate the current GTID state so there's a record of it for auditing / debugging purposes.