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

Replication stops with ERROR when Primary Key is not defined in Multi Master

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • N/A
    • 12.3
    • Replication
    • None

    Description

      Replication stops with following ERROR when tables dont contain PRIMARY and contain different structures in Ring Topology.

      Issue was found when testing MDEV-36290

      Error :

      Last_SQL_Error	Could not execute Delete_rows_v1 event on table test.t6; Can't find record in 't6', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log master-bin.000001, end_log_pos 0
      

      Test Case :

      --source include/have_innodb.inc
      --let $rpl_topology= 1->2->1
      --source include/rpl_init.inc
       
      CREATE TABLE t6 ( id INT, a INT, b INT);
       
      SET SESSION sql_log_bin=0;
      ALTER TABLE t6 ADD COLUMN m1col INT AFTER a;
      set session sql_log_bin=1;
       
      --echo on server1
      --query_vertical SHOW SLAVE STATUS
       
      --source include/rpl_sync.inc
       
      --let $rpl_connection_name= server_2
      --source include/rpl_connection.inc
       
      SET SESSION sql_log_bin=0;
      ALTER TABLE t6 ADD COLUMN m2col INT AFTER a;
      set session sql_log_bin=1;
       
      INSERT INTO t6 VALUES(1,1,1,1);
      INSERT INTO t6 VALUES(2,2,2,2);
      SELECT * FROM t6;
       
      --source include/rpl_sync.inc
       
      --let $rpl_connection_name= server_1
      --source include/rpl_connection.inc
       
      SELECT * FROM t6;
      INSERT INTO t6 VALUES(3,3,3,3);
      INSERT INTO t6 VALUES(4,4,4,4);
       
       
      --echo expect 4 rows
      SELECT * FROM t6;
       
      --source include/rpl_sync.inc
       
      UPDATE t6 SET a=4 WHERE m1col=1;
       
      --source include/rpl_sync.inc
       
      --let $rpl_connection_name= server_1
      --source include/rpl_connection.inc
       
       
      DELETE FROM t6 WHERE m1col IS NULL;
       
      --echo only 2 rows
       
      SELECT * FROM t6;
       
      --let $rpl_connection_name= server_2
      --source include/rpl_connection.inc
       
      --sleep 5
      --echo DELETE FAILS HERE
      --query_vertical SHOW SLAVE STATUS
       
      
      

      Execute as :

      ./mtr rpl_multi_master --mariadbd=--binlog-format=ROW --mariadbd=--binlog-row-metadata=FULL
      

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              Deepthi ES Deepthi Eranti Sreenivas
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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