Bug #90447 Improve Error message if unable to change gtid_purged.

Submitted: 16 Apr 2018 10:35 Modified: 19 Apr 2018 8:16
Reporter: Simon Mudd Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.7.21 OS:Any
Assigned to: CPU Architecture:Any

[16 Apr 2018 10:35] Simon Mudd
Description:
I recently got this error message by incorrectly providing a valid gtid_set.

root@host [(none)]> set global gtid_purged = 'ac54bd7-1408-11e4-8ad2-fc15b40b0c68:29339039-47562835,5ce59847-80cb-11e6-ae2f-fc15b40b0c68:1-132906235,6128a9ac-549d-11e7-bd28-8cdcd41d0600:1-52548401,64fa2562-573b-11e7-9bb1-5cb901da7410:1-183604199,740de8a1-1850-11e7-bf4a-246e96133050:1-3812427,891f7a1a-86e3-11e6-8272-246e961697f0:1-51406701,aafddb47-170c-11e4-9e7e-fc15b40a0ca8:1-63219024,c55d810b-54b1-11e7-8f26-9cdc71ced190:1-4';
ERROR 1231 (42000): Variable 'gtid_purged' can't be set to the value of 'ac54bd7-1408-11e4-8ad2-fc15b40b0c68:29339039-47562835,5ce59847-80cb-11e6-ae2f-fc15b40b0c68:1-132906235,6128a9ac-549d-11e7-bd28-8cdcd41d0600:1-52548401,64fa2562-573b-11e7-9bb1-5cb901da7410:1-183604199,'
root@host [(none)]>

GTID sets can get quite large if you switch masters frequently and I had to resolve an issue with a rogue transaction inserted into the slave.

The cause of the error was the incomplete uuid value which was missing a digit.  Sometime this is not very visible given the rather non-human-friendly content of gtid_executed or gtid_purged.

How to repeat:
see above.

Suggested fix:
Change the error message to be more precise. Something like:

Variable 'gtid_purged' can't be set to the value requested: invalid uuid 'ac54bd7-1408-11e4-8ad2-fc15b40b0c68' specified.

This is much easier to understand and therefore correct.

In other cases try to provide a bit more context as to the problem.
[19 Apr 2018 8:16] MySQL Verification Team
Hello Simon,

Thank you for the feature request!

Thanks,
Umesh

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.