Bug #76141 Correct help text for binlog_gtid_simple_recovery
Submitted: 4 Mar 2015 10:53 Modified: 26 Mar 2015 9:34
Reporter: Sven Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any

[4 Mar 2015 10:53] Sven Sandberg
Description:
The help text for binlog_gtid_simple_recovery is mostly ok, but wrong on some corner cases:

       "If this option is enabled, the server does not scan more than
       one binary log for every iteration when initializing GTID sets
       on server restart. Enabling this option is very useful when
       restarting a server which has already generated lots of binary
       logs without GTID events. Note: If this option is enabled,
       GLOBAL.GTID_EXECUTED and GLOBAL.GTID_PURGED cannot be
       initialized correctly if binary log(s) with GTID events were
       generated before binary log(s) without GTID events, for example
       if gtid_mode is disabled when the server has already generated
       binary log(s) with GTID events and not purged them."

- "one binary log per iteration" is confusing. There is exactly one binary log per iteration regardless of this option, the difference is the number of iterations.

- There is one more case when this option gives wrong values, namely if SET GTID_PURGED was issued after the last binary log was generated.

- The help text needs to change in 5.7, since the problems only happen when some binary logs were generated by a pre-WL#7592 server.

How to repeat:
read the text

Suggested fix:
5.6:

       "If this option is enabled, the server does not open more than
       two binary logs when initializing GTID sets on server
       restart. Enabling this option is useful when restarting a
       server which has already generated many binary logs without
       GTID events (e.g. having GTID_MODE = OFF). Note: If this option
       is enabled, GLOBAL.GTID_EXECUTED and GLOBAL.GTID_PURGED may be
       initialized wrongly in two cases: (1) GTID_MODE was ON for some
       binary logs but OFF for the newest binary log. (2) SET
       GTID_PURGED was issued after the oldest binary log was
       generated.",

5.7:

       "If this option is enabled, the server does not open more than
       two binary logs when initializing GTID sets on server
       restart. Enabling this option is useful when restarting a
       server which has already generated many binary logs without
       GTID events (e.g. having GTID_MODE = OFF). Note: If this option
       is enabled, GLOBAL.GTID_EXECUTED and GLOBAL.GTID_PURGED may be
       initialized wrongly in two cases: (1) All binary logs were
       generated by MySQL 5.7.5 or older, and GTID_MODE was ON for
       some binary logs but OFF for the newest binary log. (2) The
       oldest binary log was generated by MySQL 5.7.5 or older, and
       SET GTID_PURGED was issued after the oldest binary log was
       generated.",