Backup corrupted for PS 5.7 when DDL statements running
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB | Status tracked in 2.4 | |||||
2.4 |
Fix Released
|
Critical
|
Sergei Glushchenko |
Bug Description
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/#
InnoDB: Cannot rename './db1/
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 | @@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-
sysbench --db-driver=mysql --test=oltp --mysql-
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-
Prepare the backup
percona-
Full example prepare-log in attachment.
I could not reproduce the problem doing the same tests against Percona Server 5.6.29.