Restore table with ALTER IMPORT TABLESPACE fails with ERROR 1815 (HY000): Internal error: Cannot reset LSNs in table : Data structure corruption

Bug #1722651 reported by Garima
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
New
Undecided
Unassigned

Bug Description

I was restoring the data from percona xtrabackup then extracting individual table for restoring. Restore table with ALTER IMPORT TABLESPACE fails with ERROR 1815 (HY000): Internal error: Cannot reset LSNs in table : Data structure corruption

The table schema looks like
CREATE TABLE `test_table` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id2` int(11) NOT NULL,
  `key` char(40) NOT NULL,
  `path` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uidx_key` (`id2`,`key`,`path`),
  KEY `idx_key` (`key`),
  KEY `idx_path` (`path`),
  KEY `idx_id2` (`id2`),
  CONSTRAINT `fk_1` FOREIGN KEY (`path`) REFERENCES `test2` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fk_id2` FOREIGN KEY (`id2`) REFERENCES `test3` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 |

We are running mysql 5.6.28 and innobackupex version 2.3.3.

Revision history for this message
Jericho Rivera (jericho-rivera) wrote :

Hi, can you please provide the steps to restore the backup. Kindly upload the xtrabackup restore log if it is still available. Did you change file permissions after restoring the backup?

Changed in percona-server:
status: New → Incomplete
Revision history for this message
Garima (gbajaj) wrote :

Restore steps are -

//Run as mysql user
//Note that Mysql is running at this time because we are doing individual table restore.
RESET MASTER; //(To escape gtid error)
Create the schema for the table;
SET foreign_key_checks = 0;
ALTER TABLE <table> DISCARD TABLESPACE;
SET foreign_key_checks = 1;
rm -rf <table>.exp <table>.ibd
tar vxzf ${_exp_backup_filename} -C $_mysqldatadir/$dest_db_name //extracting exp file into mysql datadir
ALTER TABLE <table> IMPORT TABLESPACE;

Mysql.err
[Warning] InnoDB: ./_db/test_table.ibd: Page 8 at offset 131072 looks corrupted.
[Warning] InnoDB: ./_db/test_table1.ibd: Page 7 at offset 114688 looks corrupted.
[Warning] InnoDB: ./_db/test_table2.ibd: Page 7 at offset 114688 looks corrupted.
[Warning] InnoDB: ./_db/test_table3.ibd: Page 7 at offset 114688 looks corrupted.
[Warning] InnoDB: ./_db/test_table4.ibd: Page 7 at offset 114688 looks corrupted.

File permission after the process looks like - //I did not change anything
[mysql@host ~]$ ls -al _db/test_table*
-rw-r--r-- 1 mysql other_user 16384 Oct 3 13:12 _db/test_table.exp
-rw-r----- 1 mysql other_user 163840 Oct 10 02:30 _db/test_table.ibd

Attaching Restore output.

Revision history for this message
Garima (gbajaj) wrote :
Garima (gbajaj)
Changed in percona-server:
status: Incomplete → New
Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

Thank you for the feedback.

Please also clarify:

- Which version of source and destination servers do you run? Are they both 5.6.28 or different?
- How big is size of the original table?
- Which configuration options you use on source and destination servers? Provide configuration files from both.

Changed in percona-server:
status: New → Incomplete
Revision history for this message
Garima (gbajaj) wrote :

- same on both source and destination (5.6.28)
- size 160K
- same configuration on both. Attaching the configuration.

Changed in percona-server:
status: Incomplete → New
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.