include table definition information (CREATE TABLE) for exported tables

Registered by Alexey Kopytov

Converted from bug #1027172:

It is possible to export/import tables, or to recover only a subset of tables using Xtrabackup. In order to use a table which has been exported by Xtrabackup, ALTER TABLE {DISCARD|IMPORT} TABLESPACE is required, which requires an empty table definition.

In a disaster recovery situation (such as a dropped table), the original CREATE TABLE statement may not be available.

I suggest that during the backup phase when .frm files are copied, to also collect CREATE TABLE statements for the tables that are being backed up, and write them out to a single metadata file (xtrabackup_table_metadata maybe).

The metadata file can then be used to restore the table definition before calling ALTER TABLE ... TABLESPACE.

--Justin

See also bug #1163857.

Blueprint information

Status:
Not started
Approver:
Alexey Kopytov
Priority:
Medium
Drafter:
Swany
Direction:
Needs approval
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Unknown
Milestone target:
None
(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.