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

Inconsistent mysqldump with --single-transaction using TokuDB

    XMLWordPrintable

Details

    Description

      Words in bold should be replaced with values from your environment.

      Can't create a replication slave using "single-transaction":
      mysqldump --all-databases --single-transaction --gtid --master-data -h MASTER.HOST -u USERNAME -p PASSWORD | mysql -h SLAVE.HOST -u USERNAME -p PASSWORD

      After dump/import is finished, replication will be broken (err.: HA_ERR_FOUND_DUPP_KEY). It looks like later transaction are visible to mysqldump.

      Steps to reproduce:

      1. prepare two MariaDB databases (one on host MASTER.HOST, second on SLAVE.HOST )
      2. create a test db and an example table (example_create_stmts.sql) on MASTER.HOST
      3. start writing to the example table (mysql_insert_loop.sh)
      4. try to create a mysql slave using the above mysqldump command
      5. after the command completes, issue "START SLAVE;" on the SLAVE.HOST

      You will end up with a broken replication.

      A work-around is to use --lock-all-tables instead of --single-transaction. This will block all writes to the MASTER.HOST until the dump/import is complete.

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            sn-x Aljaž Mežnarič
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.