-
Sven Sandberg authored
Background: In 5.6, GTID_MODE can only take two values: ON and OFF. In 5.7, GTID_MODE can take four values: ON, ON_PERMISSIVE, OFF_PERMISSIVE, and OFF. A 5.7 master should be able to replicate to a 5.6 slave if master uses X_PERMISSIVE and slave uses X. Problem: Due to a sanity check on the slave where the slave explicitly checks the master's GTID_MODE, the slave refuses to start replication. The 5.6 server was actually prepared to handle the new modes introduced by 5.7, but in the end the names of the modes were changed: 5.6 allows a master to have modes UPGRADE_STEP_1 and UPGRADE_STEP_2 but not ON_PERMISSIVE or OFF_PERMISSIVE. Fix: - Allow slave to replicate if the master's GTID_MODE *begins* with ON or OFF. The slave in this case will ignore the remainder of the GTID_MODE string and treat master as being ON or OFF. - Report a warning if the master's GTID_MODE begins with ON or OFF but is not equal to ON or OFF. - Change server to use the names ON_PERMISSIVE and OFF_PERMISSIVE in some error messages. @sql/rpl_slave.cc - Allow master's GTID_MODE to be any string that begins with ON or OFF. - Report a warning if the master's GTID_MODE begins with ON or OFF but is not equal to ON or OFF. @mysql-test/include/assert_grep.inc - Backport this test utility from 5.7. @mysql-test/suite/rpl/t/rpl_gtid_mode.test - Add cases for OFF_PERMISSIVE and ON_PERMISSIVE. @mysql-test/suite/rpl/t/rpl_gtid_mode_off_new_master.test - New test running with gtid_mode=off. @mysql-test/suite/rpl/t/rpl_gtid_mode_on_new_master.test - New test running with gtid_mode=on.
Sven Sandberg authoredBackground: In 5.6, GTID_MODE can only take two values: ON and OFF. In 5.7, GTID_MODE can take four values: ON, ON_PERMISSIVE, OFF_PERMISSIVE, and OFF. A 5.7 master should be able to replicate to a 5.6 slave if master uses X_PERMISSIVE and slave uses X. Problem: Due to a sanity check on the slave where the slave explicitly checks the master's GTID_MODE, the slave refuses to start replication. The 5.6 server was actually prepared to handle the new modes introduced by 5.7, but in the end the names of the modes were changed: 5.6 allows a master to have modes UPGRADE_STEP_1 and UPGRADE_STEP_2 but not ON_PERMISSIVE or OFF_PERMISSIVE. Fix: - Allow slave to replicate if the master's GTID_MODE *begins* with ON or OFF. The slave in this case will ignore the remainder of the GTID_MODE string and treat master as being ON or OFF. - Report a warning if the master's GTID_MODE begins with ON or OFF but is not equal to ON or OFF. - Change server to use the names ON_PERMISSIVE and OFF_PERMISSIVE in some error messages. @sql/rpl_slave.cc - Allow master's GTID_MODE to be any string that begins with ON or OFF. - Report a warning if the master's GTID_MODE begins with ON or OFF but is not equal to ON or OFF. @mysql-test/include/assert_grep.inc - Backport this test utility from 5.7. @mysql-test/suite/rpl/t/rpl_gtid_mode.test - Add cases for OFF_PERMISSIVE and ON_PERMISSIVE. @mysql-test/suite/rpl/t/rpl_gtid_mode_off_new_master.test - New test running with gtid_mode=off. @mysql-test/suite/rpl/t/rpl_gtid_mode_on_new_master.test - New test running with gtid_mode=on.
Loading