Description:
It would be a nice feature if a warning would be logged to the error log when a gap is detected in gtid transactions.
For instance, it is possible to have a missing transaction, which can be seen here:
SELECT @@global.gtid_executed
495026d5-81c4-11e2-8bb6-0296f9c14830:1-2,
98cba6c2-81d2-11e2-8c14-0296f9d510ce:1-69398730:69398732-165311869,
9dac41db-81c8-11e2-8bd2-065e7ea1bc7d:1-25627850,
ddc9b988-9811-11e2-9d25-065e7ead6b68:1,
e3f234a5-9810-11e2-9d1f-065e7e937932:1
SELECT @@global.gtid_purged
495026d5-81c4-11e2-8bb6-0296f9c14830:1-2,
98cba6c2-81d2-11e2-8c14-0296f9d510ce:1-69398730:69398732-130357223,
9dac41db-81c8-11e2-8bd2-065e7ea1bc7d:1-25627850,
ddc9b988-9811-11e2-9d25-065e7ead6b68:1,
e3f234a5-9810-11e2-9d1f-065e7e937932:1
So the missing transaction is: 98cba6c2-81d2-11e2-8c14-0296f9d510ce:69398731
Note the master did not exhibit the gap, so it was introduced on the slave (though I'm not sure how that was caused).
At any rate, once the slave is stopped, and then restarted, an error will occur if the gap is in a binlog that has already been purged (which in this case it is, because we see it in gtid_purged).
Thus, it would be nice to be aware of this beforehand, if at all possible. At least if it were logged, one would be more likely to notice the problem.
How to repeat:
N/A
Suggested fix:
Add warning to error log when missing gtid transaction is noticed.