Skip to content
  • Sven Sandberg's avatar
    df98fc7b
    BUG#19706455: RESET MASTER SHOULD RESET GTID STATE AND NOT ERROR OUT WHEN BINLOG IS OFF · df98fc7b
    Sven Sandberg authored
    The GTID state (GTID_EXECUTED and GTID_PURGED) can be reset using
    RESET MASTER.
    
    RESET MASTER only works when the binary log is enabled. If the binary
    log is disabled, RESET MASTER fails with an error. This did not limit
    the GTID feature in 5.6, since GTIDs could only be enabled when the
    binary log was enabled.
    
    However, since WL#6559 was pushed to 5.7.5, GTIDs can be enabled even
    when the binary log is disabled. So in this case there is no way to
    reset the GTID state.
    
    Fix: Make RESET MASTER reset gtid_executed and gtid_purged even when
    binary logging is disabled.
    
    @sql/rpl_master.cc
    - Fix the server bug.
    
    @mysql-test/suite/binlog/t/binlog_anonymous_ownership.test
    - Fix unrelated test race (test failed by coincidence when testing
      this bug). The test disconnected a session that was in the middle of
      an anonymous transaction and then immediately asserted that the
      counter of anonymous transactions has decremented. However, the
      counter is decremented in thread cleanup code that runs
      asynchronously, so it might not have executed at the time the
      condition was checked.  Added a synchronization step where the test
      waits for the thread to disappear.
    
    @mysql-test/suite/sys_vars/t/gtid_purged_basic.test
    - Test that RESET MASTER works even when binary log is disabled.
    
    @mysql-test/include/rpl_init.inc
    - Make tests call RESET MASTER even if binary log is disabled.
    
    @mysql-test/suite/rpl/t/rpl_binlog_errors.test
    @mysql-test/t/disabled_replication.test
    - RESET MASTER no longer generates an error when binlog is disabled.
    
    Most other test files:
    - Many tests don't need to force a server restart now that
      rpl_init.inc executes RESET MASTER even on a binlog-less slave.
      (Removed force-restart from some unrelated cases too, where that
      was easy.)
    
    @mysql-test/suite/rpl/t/rpl_simulate_create_trunk_failure.test
    @sql/rpl_gtid_set.cc
    - Don't force restart. Also corrected typo trunk->chunk.
    df98fc7b
    BUG#19706455: RESET MASTER SHOULD RESET GTID STATE AND NOT ERROR OUT WHEN BINLOG IS OFF
    Sven Sandberg authored
    The GTID state (GTID_EXECUTED and GTID_PURGED) can be reset using
    RESET MASTER.
    
    RESET MASTER only works when the binary log is enabled. If the binary
    log is disabled, RESET MASTER fails with an error. This did not limit
    the GTID feature in 5.6, since GTIDs could only be enabled when the
    binary log was enabled.
    
    However, since WL#6559 was pushed to 5.7.5, GTIDs can be enabled even
    when the binary log is disabled. So in this case there is no way to
    reset the GTID state.
    
    Fix: Make RESET MASTER reset gtid_executed and gtid_purged even when
    binary logging is disabled.
    
    @sql/rpl_master.cc
    - Fix the server bug.
    
    @mysql-test/suite/binlog/t/binlog_anonymous_ownership.test
    - Fix unrelated test race (test failed by coincidence when testing
      this bug). The test disconnected a session that was in the middle of
      an anonymous transaction and then immediately asserted that the
      counter of anonymous transactions has decremented. However, the
      counter is decremented in thread cleanup code that runs
      asynchronously, so it might not have executed at the time the
      condition was checked.  Added a synchronization step where the test
      waits for the thread to disappear.
    
    @mysql-test/suite/sys_vars/t/gtid_purged_basic.test
    - Test that RESET MASTER works even when binary log is disabled.
    
    @mysql-test/include/rpl_init.inc
    - Make tests call RESET MASTER even if binary log is disabled.
    
    @mysql-test/suite/rpl/t/rpl_binlog_errors.test
    @mysql-test/t/disabled_replication.test
    - RESET MASTER no longer generates an error when binlog is disabled.
    
    Most other test files:
    - Many tests don't need to force a server restart now that
      rpl_init.inc executes RESET MASTER even on a binlog-less slave.
      (Removed force-restart from some unrelated cases too, where that
      was easy.)
    
    @mysql-test/suite/rpl/t/rpl_simulate_create_trunk_failure.test
    @sql/rpl_gtid_set.cc
    - Don't force restart. Also corrected typo trunk->chunk.
Loading