xtrabackup export - support tables with more than 31 indexes

Bug #1089681 reported by Ryan Brothers
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Status tracked in 2.4
2.0
Won't Fix
Medium
Unassigned
2.1
Won't Fix
Medium
Unassigned
2.2
Won't Fix
Medium
Unassigned
2.3
Fix Released
Medium
Vasily Nemkov
2.4
Fix Released
Medium
Vasily Nemkov

Bug Description

I have a InnoDB table with 50 fields and many of the fields are foreign keys, so because of that, the table has a large number of indexes. I followed the instructions on http://www.percona.com/doc/percona-xtrabackup/xtrabackup_bin/exporting_importing_tables.html to export the table, but when I ran xtrabackup --prepare --export, I noticed that the table was skipped and an .exp file was not created.

Looking in xtrabackup.c, there's a error thrown that says "xtrabackup: error: sorry, cannot export over 31 indexes for now."

Can the export in xtrabackup please be modified to support > 31 indexes in a table?

Thanks,
Ryan

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Yes, the limitation of 31 indexes is implied by the current format of .exp files. Currently, an .exp file is always a 16K page divided into 512-byte segments. The first segment contains the number of indexes and the table name. And the remaining 31 segments contain IDs, root page offsets and names for each index in the table.

This should be easy to fix, as I don't see a reason for an .exp file to take just one page.

Revision history for this message
djay45 (djay45) wrote :

I have the same problem with Xtrabackup latest version (2.4.3). I have a table with 47 indexes for customer needs.

Have you foresee a fix to increase that limitation?

Thanks
Jeremy

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Hi Jeremy,

Since limitation is only for .exp (which is PS 5.5 specific format), we can omit this check when exporting 5.6 or 5.7 backups.

Revision history for this message
djay45 (djay45) wrote :

Hi Sergei,

Thank you for your response.

Effectively, it would be nice to remove this check in the next release of XtraBackup.

Currently, I use MySQL5.6 and soon MySQL5.7 and perhaps MariaDB10.

Regards,
Jeremy

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

As workaround you can import tablespaces without .cfg files. MySQL 5.6 and 5.7 allowing it. xtrabackup --prepare --export is usual prepare plus creation of .cfg files.

Revision history for this message
djay45 (djay45) wrote :

Hi Sergei,

OK for .cfg file, it is not necessary.

But, when executing "xtrabackup --prepare --export" command, I have on one table a .frm and .ibd but not an .exp file.

Can I import tablespaces without .exp file?

The procedure for restoring individual tables recommends that .exp file (these files are all you need to import the table into a server running Percona Server with XtraDB or MySQL 5.6).

Thanks,
Jeremy

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Hi Jeremy,

You need .exp for Percona Server 5.5. For MySQL 5.6 and Percona Server 5.6 you need .cfg, but you still will be able to import even without .cfg. See http://dev.mysql.com/doc/refman/5.6/en/tablespace-copying.html :

ALTER TABLE ... IMPORT TABLESPACE does not require a .cfg metadata file to import a tablespace. However, metadata checks are not performed when importing without a .cfg file, and a warning similar to the following will be issued:

Message: InnoDB: IO Read error: (2, No such file or directory) Error opening '.\
test\t.cfg', will attempt to import without schema verification
1 row in set (0.00 sec)

Revision history for this message
djay45 (djay45) wrote :

Hi Sergei.

It is more clear for me :)

Just one precision after I stop...During preparing backup of one table, I have error messages on innodb stats tables of mysql db.
Do I need to take into account mysql database in my partial backup to delete errors or just ignoring InnoDb error messages?

Thanks a lot,
Jeremy

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Hi Jeremy,

You can ignore error messages or you can specify the same filter you used for partial backup to suppress them.

Revision history for this message
djay45 (djay45) wrote :

thanks Sergei.

Revision history for this message
Vasily Nemkov (vasily.nemkov) wrote :
Revision history for this message
Vasily Nemkov (vasily.nemkov) wrote :
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/PXB-58

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.