Uploaded image for project: 'Percona XtraBackup'
  1. Percona XtraBackup
  2. PXB-247

LP #1555626: Backup corrupted for PS 5.7 when DDL statements running

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      **Reported in Launchpad by Przemek last update 17-05-2016 13:18:50

      Apply-log stage fails for a backup taken during some DDL workload, with example error:

      InnoDB: Ignoring data file './db1/sb1.ibd' with space ID 112. Another data file called ./db1/#sql-ib123-1282040285.ibd exists with the same space ID.
      InnoDB: Cannot rename './db1/#sql-ib123-1282040285.ibd' to './db1/sb1.ibd' for space ID 112 because the target file exists. Remove the target file and try again.
      InnoDB: Cannot replay file rename. Remove either file and try again.
      InnoDB: Plugin initialization aborted with error Generic error
      xtrabackup: innodb_init(): Error occured.

      How to reproduce:

      mysql [localhost]

      {msandbox}

      ((none)) > select @@version,@@version_comment;
      ------------------------------------------------------------+

      @@version @@version_comment

      ------------------------------------------------------------+

      5.7.10-3 Percona Server (GPL), Release 3, Revision 63dafaf

      ------------------------------------------------------------+
      1 row in set (0.00 sec)

      Prepare two simple sysbench tables:
      sysbench --db-driver=mysql --test=oltp --mysql-table-engine=InnoDB --mysql-db=db1 --mysql-user=msandbox --mysql-password=msandbox --oltp-table-size=2000000 --mysql-socket=/tmp/mysql_sandbox25710.sock --test=/usr/share/doc/sysbench/tests/db/oltp.lua prepare
      sysbench --db-driver=mysql --test=oltp --mysql-table-engine=InnoDB --mysql-db=db2 --mysql-user=msandbox --mysql-password=msandbox --oltp-table-size=2000000 --mysql-socket=/tmp/mysql_sandbox25710.sock --test=/usr/share/doc/sysbench/tests/db/oltp.lua prepare

      Prepare simple bash script (inside sandbox instance):
      cat test.sh
      #!/bin/bash

      echo "drop table if exists db1.sb1"|./use
      echo "create table sb1 as select id,c from sbtest1 where id < 150000;"|./use db1
      echo "create unique index ix on sb1 (id)"|./use db1
      sleep 1
      echo "drop table if exists db2.sb1"|./use
      echo "create table sb1 as select id,c from sbtest1 where id < 150000;"|./use db2
      echo "create unique index ix on sb1 (id)"|./use db2

      Run the script in loop while the backup is taken:
      > while true; do bash test.sh; done

      Run standard backup:
      percona-xtrabackup-2.4.1-Linux-x86_64/bin/innobackupex --user=msandbox --password=msandbox --socket=/tmp/mysql_sandbox25710.sock backups/

      Prepare the backup
      percona-xtrabackup-2.4.1-Linux-x86_64/bin/innobackupex--apply-log backups/...

      Full example prepare-log in attachment.

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lpjirasync lpjirasync (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: