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

When creating a table in the master database, and then executing stop slave, add index, start slave in the slave database; a replication error occurred from the slave ; but there was no exception in mysql

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 10.3.22
    • N/A
    • Replication
    • OS:Ubuntu 5.4.0-6ubuntu1~16.04.9
      master:10.3.8-MariaDB-1:10.3.8+maria~xenial-log
      slave:10.3.22-MariaDB-1:10.3.22+maria~xenial-log

    Description

      When creating a table in the master database, and then executing stop slave, add index, start slave in the slave database; a replication error occurred from the slave ; but there was no exception in mysql

      1、Executed master

      CREATE TABLE `test_replication_temp` (
      `id` int(11) ,
      `name` varchar(150) NOT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

      insert into test_replication_temp(id,name)value(1,'hello');

      2、Executed slave

      select * from test_replication_temp;
      stop slave;
      alter table test_replication_temp add index idx_name(name);
      start slave;
      show slave status;

      Slave_IO_State:
      Master_Host: xxx.xx.xxx.xxx
      Master_User: replication
      Master_Port: 3306
      Connect_Retry: 60
      Master_Log_File: mariadb-bin.035179
      Read_Master_Log_Pos: 69239370
      Relay_Log_File: mysqld-relay-bin.000001
      Relay_Log_Pos: 4
      Relay_Master_Log_File: mariadb-bin.035179
      Slave_IO_Running: No
      Slave_SQL_Running: Yes
      Replicate_Do_DB:
      Replicate_Ignore_DB:
      Replicate_Do_Table:
      Replicate_Ignore_Table:
      Replicate_Wild_Do_Table:
      Replicate_Wild_Ignore_Table:
      Last_Errno: 0
      Last_Error:
      Skip_Counter: 0
      Exec_Master_Log_Pos: 69239370
      Relay_Log_Space: 256
      Until_Condition: None
      Until_Log_File:
      Until_Log_Pos: 0
      Master_SSL_Allowed: No
      Master_SSL_CA_File:
      Master_SSL_CA_Path:
      Master_SSL_Cert:
      Master_SSL_Cipher:
      Master_SSL_Key:
      Seconds_Behind_Master: NULL
      Master_SSL_Verify_Server_Cert: No
      Last_IO_Errno: 1236
      Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Error: connecting slave requested to start from GTID 0-xxxxx-2695522268, which is not in the master's binlog. Since the master's binlog contains GTIDs with higher sequence numbers, it probably means that the slave has diverged due to executing extra erroneous transactions'
      Last_SQL_Errno: 0
      Last_SQL_Error:
      Replicate_Ignore_Server_Ids:
      Master_Server_Id: xxxxxxx
      Master_SSL_Crl:
      Master_SSL_Crlpath:
      Using_Gtid: Current_Pos
      Gtid_IO_Pos: 0-xxxxx-2695522268
      Replicate_Do_Domain_Ids:
      Replicate_Ignore_Domain_Ids:
      Parallel_Mode: conservative
      SQL_Delay: 0
      SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
      Slave_DDL_Groups: 18
      Slave_Non_Transactional_Groups: 0
      Slave_Transactional_Groups: 84575

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hongsheng.zhou hongsheng zhou
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.