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

MariaDB 10.2.22 is writing duplicate entries into binary log

    XMLWordPrintable

Details

    Description

      We have a Master/Master Setup on two servers, but are only writing to one of those servers (so it is essentially Master/Slave)

      We upgraded from 10.1.* to 10.2.22 last week and starting with the upgrade, we are getting duplicate key errors on the slave.

      BINLOG=mixed

      Examing the binary log on the master and the relay log on the slave, we see:

      • BEGIN

      Then one binary blob:

      • INSERT table1 (id 1)
      • INSERT table2 (this one is triggered by the insert in table1)
      • INSERT table3 (id 4711)

      And then in Statement format:

      • INSERT table3 (id 4711)
      • COMMIT

      Which fails since it repeats the last statement of the binary blob.

      If I replay it by hand and leave out the statement block, everything is ok.

      I have found others to have the same problem. They found this bug starting with 10.2.10 (but it can also be earlier). One example is https://stackoverflow.com/questions/47650166/mariadb-10-2-10-writing-double-binlog-entries-in-mixed-format

      What adds to the strangeness: Only 1 in 100 inserts triggers this behavior and it only seems to be triggered on clients that access the master from outside the network (additionally, this client has MariaDB client libs from 10.1.*). So maybe it is a timing issue?

      Attachments

        Activity

          People

            sujatha.sivakumar Sujatha Sivakumar (Inactive)
            kilroy kilroy
            Votes:
            1 Vote for this issue
            Watchers:
            5 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.