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

Multi-Value Insert with duplicate keys results in out-of-sync replication

    XMLWordPrintable

Details

    Description

      With replication setup as A => B => C, and a MyISAM table with only an id field as a primary key, executing these statements on A

      INSERT INTO MyTable ( id ) VALUES ( 1 ), ( 2 ), ( 3 ), ( 4 );
      INSERT INTO MyTable ( id ) VALUES ( 6 ), ( 5 ), ( 4 ), ( 3 );
      

      of course results in a duplicate key error on the second statement, but not until after keys 6 and 5 are already written. The two statements are then sent to Slave B, with the same result; I.E., the tables on A and B now each have the same 6 rows.

      However, Slave B does not pass the second statement on to Slave C at all (never hits the Slave B binlog). So Slave C only has 4 rows. Additionally, I see no errors or messages in the Slave B log to indicate that the statement resulted in duplicate key errors, nor that the statement was not replicated.

      sql_mode is blank on all three servers, and slave_skip_errors is OFF. Also, binlog_format is MIXED.

      Is this expected/intended behavior, and is it documented somewhere that I could take a look?

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            dragle Daniel Ragle
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.