innodb_import_table_from_xtrabackup Crash When Importing to Fresh ibdata1
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Won't Fix
|
Medium
|
Unassigned | |||
5.5 |
Triaged
|
Medium
|
Unassigned | |||
5.6 |
Invalid
|
Undecided
|
Unassigned | |||
5.7 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When importing multiple tablespaces into a fresh ibdata1 with innodb_
Percona Server 5.5.24 and XtraBackup 2.0.1
How to repeat (with MySQL Sandbox):
1. Create several tables, I used 5, with sysbench:
sysbench --test=
2. Take a backup:
innobackupex --defaults-
3. Prepare the backup for export:
xtrabackup_55 --defaults-
5. Recreate the sandbox for fresh ibdata1:
make_sandbox 5.5.240 -- --my_clause innodb_
6. Create the tables and discard tablesppaces:
CREATE TABLE `sbtest1` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` char(120) NOT NULL DEFAULT '',
`pad` char(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `k_1` (`k`)
) ENGINE=InnoDB;
CREATE TABLE sbtest2 LIKE sbtest1;
CREATE TABLE sbtest3 LIKE sbtest1;
CREATE TABLE sbtest4 LIKE sbtest1;
CREATE TABLE sbtest5 LIKE sbtest1;
ALTER TABLE sbtest1 DISCARD TABLESPACE;
ALTER TABLE sbtest2 DISCARD TABLESPACE;
ALTER TABLE sbtest3 DISCARD TABLESPACE;
ALTER TABLE sbtest4 DISCARD TABLESPACE;
ALTER TABLE sbtest5 DISCARD TABLESPACE;
7. Copy the tablespaces and exp files:
cp -v bkp/201/test/*.ibd ./msb_5_
8. Import one by one and watch it crash:
SET GLOBAL innodb_
ALTER TABLE sbtest1 IMPORT TABLESPACE;
ALTER TABLE sbtest2 IMPORT TABLESPACE;
ALTER TABLE sbtest3 IMPORT TABLESPACE;
ALTER TABLE sbtest4 IMPORT TABLESPACE;
ALTER TABLE sbtest5 IMPORT TABLESPACE;
Attaching server error log - the first crash is the initial IMPORT TABLESPACE, the second crash is another attempt on the same table, the 3rd crash is an attempt to import the next table, the last is a SELECT COUNT(*) attempt on the second table.