Fix for 1322658 not ported to 2.3 and 2.4 of Xtrabackup

Bug #1555423 reported by Jericho Rivera on 2016-03-10
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Status tracked in 2.4
2.3
Fix Released
High
Sergei Glushchenko
2.4
Fix Released
High
Sergei Glushchenko

Bug Description

It seems like the fix for restore using --copy-back for partitioned tables with own tablespace was not ported to v2.3 and v2.4 of Xtrabackup. [https://bugs.launchpad.net/percona-xtrabackup/+bug/1322658]

mysql> show create table employees\G
*************************** 1. row ***************************
       Table: employees
Create Table: CREATE TABLE `employees` (
  `id` int(11) NOT NULL,
  `store_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (store_id)
(PARTITION p0 VALUES LESS THAN (6) DATA DIRECTORY = '/opt/p0' ENGINE = InnoDB,
 PARTITION p1 VALUES LESS THAN (11) DATA DIRECTORY = '/opt/p1' ENGINE = InnoDB,
 PARTITION p2 VALUES LESS THAN (16) DATA DIRECTORY = '/opt/p2' ENGINE = InnoDB,
 PARTITION p3 VALUES LESS THAN (21) ENGINE = InnoDB) */
1 row in set (0.00 sec)

innobackupex version 2.3.3 based on MySQL server 5.6.24 Linux (x86_64) (revision id: 525ca7d)

160308 23:06:10 [01] Copying /opt/p0/test/employees#P#p0.ibd to /backups//2016-03-08_23-06-09/test/employees#P#p0.ibd
160308 23:06:10 [01] ...done
160308 23:06:10 [01] Copying /opt/p1/test/employees#P#p1.ibd to /backups//2016-03-08_23-06-09/test/employees#P#p1.ibd
160308 23:06:10 [01] ...done
160308 23:06:10 [01] Copying /opt/p2/test/employees#P#p2.ibd to /backups//2016-03-08_23-06-09/test/employees#P#p2.ibd
160308 23:06:10 [01] ...done
160308 23:06:10 [01] Copying /opt/p3/test/employees#P#p3.ibd to /backups//2016-03-08_23-06-09/test/employees#P#p3.ibd
160308 23:06:10 [01] ...done

160308 23:06:14 [01] Copying ./test/employees#P#p0.isl to /backups//2016-03-08_23-06-09/test/employees#P#p0.isl
160308 23:06:14 [01] ...done
160308 23:06:14 [01] Copying ./test/employees#P#p1.isl to /backups//2016-03-08_23-06-09/test/employees#P#p1.isl
160308 23:06:14 [01] ...done
160308 23:06:14 [01] Copying ./test/employees#P#p2.isl to /backups//2016-03-08_23-06-09/test/employees#P#p2.isl
160308 23:06:14 [01] ...done
160308 23:06:14 [01] Copying ./test/employees#P#p3.isl to /backups//2016-03-08_23-06-09/test/employees#P#p3.isl
160308 23:06:14 [01] ...done

On copy-back phase:

160308 23:07:43 [01] Copying ./test/employees#P#p0.ibd to /var/lib/mysql/test/employees#P#p0.ibd
160308 23:07:43 [01] ...done
160308 23:07:43 [01] Copying ./test/employees#P#p1.ibd to /var/lib/mysql/test/employees#P#p1.ibd
160308 23:07:43 [01] ...done
160308 23:07:43 [01] Copying ./test/employees#P#p2.ibd to /var/lib/mysql/test/employees#P#p2.ibd
160308 23:07:43 [01] ...done
160308 23:07:43 [01] Copying ./test/employees#P#p3.ibd to /var/lib/mysql/test/employees#P#p3.ibd
160308 23:07:43 [01] ...done
160308 23:07:43 [01] Copying ./test/employees.par to /var/lib/mysql/test/employees.par
160308 23:07:43 [01] ...done
160308 23:07:43 [01] Copying ./test/employees#P#p0.isl to /var/lib/mysql/test/employees#P#p0.isl
160308 23:07:43 [01] ...done
160308 23:07:43 [01] Copying ./test/employees#P#p1.isl to /var/lib/mysql/test/employees#P#p1.isl
160308 23:07:43 [01] ...done
160308 23:07:43 [01] Copying ./test/employees#P#p2.isl to /var/lib/mysql/test/employees#P#p2.isl
160308 23:07:43 [01] ...done
160308 23:07:43 [01] Copying ./test/employees#P#p3.isl to /var/lib/mysql/test/employees#P#p3.isl
160308 23:07:43 [01] ...done

innobackupex version 2.4.1 based on MySQL server 5.7.10 Linux (x86_64) (revision id: a2dc9d4)

160309 21:35:40 [01] Copying /opt/p0/test/employees#P#p0.ibd to /backups/2016-03-09_21-35-35/test/employees#P#p0.ibd
160309 21:35:40 [01] ...done
160309 21:35:40 [01] Copying /opt/p1/test/employees#P#p1.ibd to /backups/2016-03-09_21-35-35/test/employees#P#p1.ibd
160309 21:35:40 [01] ...done
160309 21:35:40 [01] Copying /opt/p2/test/employees#P#p2.ibd to /backups/2016-03-09_21-35-35/test/employees#P#p2.ibd
160309 21:35:40 [01] ...done
160309 21:35:40 [01] Copying /opt/p3/test/employees#P#p3.ibd to /backups/2016-03-09_21-35-35/test/employees#P#p3.ibd
160309 21:35:40 [01] ...done

160309 21:35:41 [01] Copying ./test/employees#P#p0.isl to /backups/2016-03-09_21-35-35/test/employees#P#p0.isl
160309 21:35:41 [01] ...done
160309 21:35:41 [01] Copying ./test/employees#P#p1.isl to /backups/2016-03-09_21-35-35/test/employees#P#p1.isl
160309 21:35:41 [01] ...done
160309 21:35:41 [01] Copying ./test/employees#P#p2.isl to /backups/2016-03-09_21-35-35/test/employees#P#p2.isl
160309 21:35:41 [01] ...done
160309 21:35:41 [01] Copying ./test/employees#P#p3.isl to /backups/2016-03-09_21-35-35/test/employees#P#p3.isl
160309 21:35:41 [01] ...done

On copy-back phase

160309 21:44:08 [01] Copying ./test/employees#P#p0.ibd to /var/lib/mysql/test/employees#P#p0.ibd
160309 21:44:08 [01] ...done
160309 21:44:08 [01] Copying ./test/employees#P#p1.ibd to /var/lib/mysql/test/employees#P#p1.ibd
160309 21:44:08 [01] ...done
160309 21:44:08 [01] Copying ./test/employees#P#p2.ibd to /var/lib/mysql/test/employees#P#p2.ibd
160309 21:44:08 [01] ...done
160309 21:44:08 [01] Copying ./test/employees#P#p3.ibd to /var/lib/mysql/test/employees#P#p3.ibd
160309 21:44:08 [01] ...done
160309 21:44:08 [01] Copying ./test/employees.par to /var/lib/mysql/test/employees.par
160309 21:44:08 [01] ...done
160309 21:44:08 [01] Copying ./test/employees#P#p0.isl to /var/lib/mysql/test/employees#P#p0.isl
160309 21:44:08 [01] ...done
160309 21:44:08 [01] Copying ./test/employees#P#p1.isl to /var/lib/mysql/test/employees#P#p1.isl
160309 21:44:08 [01] ...done
160309 21:44:08 [01] Copying ./test/employees#P#p2.isl to /var/lib/mysql/test/employees#P#p2.isl
160309 21:44:08 [01] ...done
160309 21:44:08 [01] Copying ./test/employees#P#p3.isl to /var/lib/mysql/test/employees#P#p3.isl
160309 21:44:08 [01] ...done

Using PXB 2.2.13 it works:

On copy-back phase

innobackupex: Creating directory '/var/lib/mysql/test'
Found an .isl file for /backups/2016-03-08_22-54-45/test/employees#P#p0.ibd
Using /opt/p0/test/employees#P#p0.ibd as the destination path
Recursively creating directory /opt/p0/test
innobackupex: Copying '/backups/2016-03-08_22-54-45/test/employees#P#p0.ibd' to '/opt/p0/test/employees#P#p0.ibd'
Found an .isl file for /backups/2016-03-08_22-54-45/test/employees#P#p1.ibd
Using /opt/p1/test/employees#P#p1.ibd as the destination path
Recursively creating directory /opt/p1/test
innobackupex: Copying '/backups/2016-03-08_22-54-45/test/employees#P#p1.ibd' to '/opt/p1/test/employees#P#p1.ibd'
Found an .isl file for /backups/2016-03-08_22-54-45/test/employees#P#p2.ibd
Using /opt/p2/test/employees#P#p2.ibd as the destination path
Recursively creating directory /opt/p2/test
innobackupex: Copying '/backups/2016-03-08_22-54-45/test/employees#P#p2.ibd' to '/opt/p2/test/employees#P#p2.ibd'
Found an .isl file for /backups/2016-03-08_22-54-45/test/employees#P#p3.ibd
Using /opt/p3/test/employees#P#p3.ibd as the destination path
Recursively creating directory /opt/p3/test

Both PXB 2.3 and 2.4 manuals state this, so users would assume the feature is also available on the new versions.
innobackupex is the symlink for xtrabackup. innobackupex still supports all features and syntax as 2.2 version did, but is now deprecated and will be removed in next major release.

Changed in percona-xtrabackup:
status: New → Confirmed
Michael Wang (xw73) wrote :

The problem that the data files are not copied to the data directory as specified exists not only for partitioned tables, but also for non-partitioned tables in current version 2.3.3.

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-466

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers