Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26 Global transaction ID
  3. MDEV-4325

Relation between GTID_POS and RESET SLAVE [ALL] / CHANGE MASTER TO

    XMLWordPrintable

Details

    • Technical task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      The provided test case

      • starts master=>slave replication from scratch, using gtid_pos=auto;
      • executes 3 events on master;
      • waits till slave synchronizes with master;
      • stops replication;
      • resets slave and master;
      • executes a few events on master;
      • starts master=>slave replication from scratch, using gtid_pos=auto

      The slave attempts to start from the 4th event. Depending on the nature of the events and the exact number of the "few" events in the second round, it might result either in a replication failure, or with "fatal error 1236 from master when reading data from binary log: 'Error: connecting slave requested to start from GTID 0-1-3, which is not in the master's binlog'", or in silent ignoring of the first events in the new master binlog.

      --source include/master-slave.inc
      --source include/have_innodb.inc
      --source include/have_binlog_format_mixed.inc
       
      --echo ################
      --echo # Do it once...
      --echo ################
       
      --connection slave
      --source include/stop_slave.inc
      RESET SLAVE ALL;
       
      --connection master
      RESET MASTER;
      CREATE TABLE t1 (pk INT PRIMARY KEY);
      DROP TABLE t1;
      --save_master_pos
       
      --connection slave
      eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$MASTER_MYPORT, master_user='root', master_gtid_pos=auto;
      --source include/start_slave.inc
      --sync_with_master
       
      --echo ################
      --echo # Do it twice...
      --echo ################
       
      --source include/stop_slave.inc
      RESET SLAVE ALL;
       
      --connection master
      RESET MASTER;
      CREATE TABLE t1 (pk INT PRIMARY KEY);
      INSERT INTO t1 VALUES (1);
      INSERT INTO t1 VALUES (2);
      --save_master_pos
       
      --connection slave
      eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$MASTER_MYPORT, master_user='root', master_gtid_pos=auto;
      --source include/start_slave.inc
      --sync_with_master

      revision-id: knielsen@knielsen-hq.org-20130322102628-hxohewmbfyd1wig6
      revno: 3538
      branch-nick: 10.0-mdev26

      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.