Bug #29034 Moving raw MYISAM tables to >5.1.17 creates unrepairable tables
Submitted: 11 Jun 2007 23:03 Modified: 12 Jun 2007 16:11
Reporter: Brian McCashin Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version:5.1.19 OS:Linux (CentOS release 4.4 (Final))
Assigned to: CPU Architecture:Any
Tags: indexes, myisam

[11 Jun 2007 23:03] Brian McCashin
Description:
Moving raw MYISAM tables from version < 5.1.17 to versions >= 5.1.17 produces
"Incorrect key file for table" for approximately half of the tables in a database
of 118 tables. This bug also appears moving tables from 5.0.19 to 5.1.17 or greater.

070611 15:01:21 [Warning] Slave: Incorrect key file for table 'tblSearchTerm'; try to repair it Error_code: 1034

mysql> select count(*) from tblSearchTerm;
ERROR 1034 (HY000): Incorrect key file for table 'tblSearchTerm'; try to repair it

repair table tablename;
AND
isamchk -r tblSearchTerm
Both report success but the tables still report the same error

Bug is also appears in MacOS 10.4 

How to repeat:
I could provide a copy of one of the affected tables.

Simply moving the raw tables into the data directory chmod them
start the server and attempt a query will produce the bug.
[12 Jun 2007 9:28] Johan Idrén
I created a small test-table to reproduce this. Created the table on mysql 5.1.15 and moved to 5.1.20. It worked without error. 

Can you provide the table definition and some sample data?

If the table is not big, then you can upload it to ftp://ftp.mysql.com/pub/mysql/upload/ or attach it to the bugreport.
[12 Jun 2007 16:11] Brian McCashin
Example table is on the ftp site in bug-data-29034.tgz with appropriate README
[21 Jun 2007 10:28] Sergei Golubchik
I suspect you need an older table to repeat it. From 4.1, perhaps.
[24 Sep 2007 15:16] Dan Nelson
This seems to be a duplicate of bug #28602