Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4490

Old-style master position points at the last GTID event after slave restart

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.2
    • 10.0.4
    • None
    • None

    Description

      If a slave is restarted when it's synchronized with the master, and there are no new events in the master binlog, the old-style replication coordinates on the slave are not set properly (point at the last GTID event).
      As a result, MASTER_POS_WAIT for the current master position does not return.
      Another potential problem is that if at this point the slave is reconfigured NOT to use GTID, the last event will be re-executed, thus causing data inconsistency.

      Test case:

      --source include/master-slave.inc
       
      --connection slave
      --source include/stop_slave.inc
      eval CHANGE MASTER TO master_use_gtid=1;
      --source include/start_slave.inc
       
      --connection master
      CREATE TABLE t1 (i INT);
      INSERT INTO t1 VALUES (1);
       
      --sync_slave_with_master
       
      --enable_reconnect
      --append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
      restart: --skip-slave-start=0
      EOF
      --shutdown_server 60
      --source include/wait_until_connected_again.inc
       
      --connection master
       
      --echo # If we do INSERT here, everything works okay.
      --echo # But if we don't, sync_slave_with_master hangs
      --echo # because MASTER_POS_WAIT for the current master position
      --echo # never returns
      # insert into t1 values (2);
       
      show master status;
       
      --sync_slave_with_master
      SELECT * FROM t1;

      bzr version-info

      revision-id: knielsen@knielsen-hq.org-20130506123534-v8r8bhazhj5gr1he
      revno: 3628
      branch-nick: 10.0-base

      Attachments

        Issue Links

          Activity

            People

              knielsen Kristian Nielsen
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.