Bug #76884 fix GTID mode to work correctly in --bootstrap/--initialize mode
Submitted: 29 Apr 2015 11:34 Modified: 5 Jun 2015 9:35
Reporter: Georgi Kodinov Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.7.8 OS:Any
Assigned to: CPU Architecture:Any

[29 Apr 2015 11:34] Georgi Kodinov
Currently the mysqld initialization code (init_server_components() function) has to turn the global gtid mode off when --bootstrap is specified.
So it has the following code:

  /// @todo: this looks suspicious, revisit this /sven
  enum_gtid_mode gtid_mode= get_gtid_mode(GTID_MODE_LOCK_NONE);

  /* TODO: remove this. */
  if (gtid_mode != GTID_MODE_OFF && opt_bootstrap)
    _gtid_mode= GTID_MODE_OFF;

If you remove the if() part it crashes.

How to repeat:
Comment out the if() above and run the tests

Suggested fix:
Make sure the server works properly with the default values for gtid (on) in --bootstrap/--initialize mode.
[29 Apr 2015 11:56] Sven Sandberg
Posted by developer:
The test that fails is i_rpl.rpl_bootstrap_gtid
[25 May 2015 0:00] Paul DuBois
Note for documentation: The following locations in refman-5.7 refer to GTIDs being disabled in initialization mode and might need updating per the present bug.

[25 May 2015 15:18] David Moss
Posted by developer:
Based on discussion with Sven the following changes were made to these options:



This paragraph is now used:
In MySQL 5.7.7 and earlier, global transaction identifiers (GTIDs) were automatically disabled whenever --initialize was enabled. In MySQL 5.7.8 and later GTIDs are not disabled when --initialize is enabled.