| Bug #73571 | 'IMPORT TABLESPACE' from corrupted file leads to permanent server failure | ||
|---|---|---|---|
| Submitted: | 13 Aug 2014 14:20 | Modified: | 14 Aug 2014 17:51 |
| Reporter: | Юрий Евтухов | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
| Version: | 5.6.20 | OS: | Linux |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | crash, innodb, Tablespace | ||
[13 Aug 2014 14:20]
Юрий Евтухов
[14 Aug 2014 17:51]
Sveta Smirnova
Thank you for the report. Verified as described. Strictly say this is feature request, but very useful one.
[4 Dec 2014 10:07]
Sergey Bolbat
Same error for me. No solution found.
[13 Dec 2014 14:02]
Daniël van Eeden
Somewhat related: Bug #75187 I think the server should register the table only after an succesful import, not when the import starts. Then it won't try to access the table after a crash.
[14 Dec 2014 2:52]
Sunny Bains
The server registers the table after a successful IMPORT, not at the start.
See row0import.cc
3718 row_mysql_lock_data_dictionary(trx);
3719
3720 /* Update the root pages of the table's indexes. */
3721 err = row_import_update_index_root(trx, table, false, true);
3722
3723 if (err != DB_SUCCESS) {
3724 return(row_import_error(prebuilt, trx, err));
3725 }
3726
3727 /* Update the table's discarded flag, unset it. */
3728 err = row_import_update_discarded_flag(trx, table->id, false, true) ;
3729
3730 if (err != DB_SUCCESS) {
3731 return(row_import_error(prebuilt, trx, err));
3732 }
3733
3734 table->ibd_file_missing = false;
3735 table->flags2 &= ~DICT_TF2_DISCARDED;
3736
3737 if (autoinc != 0) {
3738 ib::info() << table->name << " autoinc value set to "
3739 << autoinc;
3740
3741 dict_table_autoinc_lock(table);
3742 dict_table_autoinc_initialize(table, autoinc);
3743 dict_table_autoinc_unlock(table);
3744 }
3745
3746 ut_a(err == DB_SUCCESS);
3747
3748 return(row_import_cleanup(prebuilt, trx, err));
3749 }
