Bug #86824 alter table import tablespace failed on innobase engine
Submitted: 26 Jun 2017 7:19 Modified: 27 Jun 2017 5:14
Reporter: yx jiang Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.7.18 OS:CentOS (6.4)
Assigned to: CPU Architecture:Any

[26 Jun 2017 7:19] yx jiang
Importing tablespace with DICT_TF_MASK_ATOMIC_BLOBS flag setted failed.

Do import tablespace with error as below

"ERROR 1808 (HY000): Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1)"

According gdb I find error reporting in function row_import::match_schema.

The original table flags is 0x1, but table newly created is 0x21. So importing failed.

How to repeat:
Export a table with DICT_TF_MASK_ATOMIC_BLOBS flag setted, then import it

Suggested fix:
Since discarding tablespace will remove ibd file, the newly created table flag is not accurate.

When importing table, rewrite the table flags according the imported table's info which stored in exported cfg file.
[27 Jun 2017 5:14] MySQL Verification Team
Hello yx jiang,

Thank you for the report and feedback.
Imho, this is most likely duplicate of Bug #79469, please see Bug #79469