Bug #67807 InnoDB table corrupted after import using ALTER TABLE ... IMPORT TABLESPACE
| Submitted: | 4 Dec 2012 23:40 | Modified: | 7 Jan 2013 23:18 |
|---|---|---|---|
| Reporter: | Dirk Lange | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
| Version: | 5.6.8-rc | OS: | Solaris |
| Assigned to: | CPU Architecture: | Any |
[4 Dec 2012 23:40]
Dirk Lange
[5 Dec 2012 19:08]
Sveta Smirnova
Thank you for the report. Verified as described.
[12 Dec 2012 8:19]
Erlend Dahl
We now have a fix for this that will probably make the 5.6.10 release.
[7 Jan 2013 23:18]
John Russell
Added to changelog for 5.6.10: Under certain circumstances, an InnoDB table was reported as corrupted after import using ALTER TABLE ... IMPORT TABLESPACE. The problem was accompanied by one of these messages: Warning : InnoDB: The B-tree of index "PRIMARY" is corrupted. error : Corrupt or: Warning : InnoDB: The B-tree of index "GEN_CLUST_INDEX" is corrupted. error : Corrupt This issue occurred intermittently, and primarily affected large tables. The REPAIR TABLE statement would fix the problem reported by the error message.
[6 Oct 2015 21:26]
Nishesh Gupta
I am using the following version -
mysql> show variables like '%version%'
-> ;
+-------------------------+--------------------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------------------+
| innodb_version | 5.6.15-rel63.0 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.6.15-63.0 |
| version_comment | Percona XtraDB Cluster (GPL), Release 25.5, wsrep_25.5.r4061 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------------------+
7 rows in set (0.00 sec)
After I import table space I get the error -
mysql> check table chunk_map;
+-----------------------------------------------+-------+----------+-----------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------------------------------------+-------+----------+-----------------------------------------------------+
| dbsnap_Tue_Oct__6_13_58_45_PDT_2015.chunk_map | check | Warning | InnoDB: The B-tree of index "PRIMARY" is corrupted. |
| dbsnap_Tue_Oct__6_13_58_45_PDT_2015.chunk_map | check | error | Corrupt |
+-----------------------------------------------+-------+----------+-----------------------------------------------------+
2 rows in set (0.00 sec)
If I run repair table -
mysql> repair table chunk_map;
+-----------------------------------------------+--------+----------+---------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------------------------------------+--------+----------+---------------------------------------------------------+
| dbsnap_Tue_Oct__6_13_58_45_PDT_2015.chunk_map | repair | note | The storage engine for the table doesn't support repair |
+-----------------------------------------------+--------+----------+---------------------------------------------------------+
1 row in set (0.00 sec)
If I run alter table and then check table -
mysql> alter table chunk_map engine=innodb;
Query OK, 13 rows affected (0.02 sec)
Records: 13 Duplicates: 0 Warnings: 0
mysql> check table chunk_map;
+-----------------------------------------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------------------------------------+-------+----------+----------+
| dbsnap_Tue_Oct__6_13_58_45_PDT_2015.chunk_map | check | status | OK |
+-----------------------------------------------+-------+----------+----------+
1 row in set (0.00 sec)
I understand that this was fixed in 5.6.10. But I still see it in 5.6.15 .
What is the solution to this defect ? What should I do so that I do not get this corruption error ?
After import if I get corruption should I run 'repair table' or 'alter table' like I have ? Repair table is not working for me as mentioned above.
[6 Oct 2015 22:02]
Sunny Bains
Since you are not using Oracle/InnoDB, it is difficult for us to make any comment. The corruption could be due to downstream changes and incompatibilities.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.055 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.