Bug #277 Table from 4.0 unreadable with 4.1 (errno: 126)
Submitted: 11 Apr 2003 13:21 Modified: 23 Apr 2003 3:14
Reporter: jocelyn fournier (Silver Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1 OS:Linux (linux)
Assigned to: Sergei Golubchik CPU Architecture:Any

[11 Apr 2003 13:21] jocelyn fournier
Description:
When trying to read a table created with 4.0 and which works fine with 4.0, I obtains with 4.1 :

mysql> SELECT * FROM produits;
ERROR 1016: Can't open file: 'produits.MYI'. (errno: 126)

I checked the table with 4.0, and also repaired it with myisamchk -r and even -o options, but nothing changes, same error.

How to repeat:
Download the file from ftp://support.mysql.com/pub/mysql/secret/produits.tar.gz

and try :

SELECT * FROM produits;
[23 Apr 2003 3:14] Sergei Golubchik
Not a bug.

This table was apparently created in MySQL 4.1, so MYI header has 4.1-specific new fields. Then, it was modified in 4.0, and the header became a 4.0/4.1 mix. 4.0 can open it, as it ignores unknown field, 4.1 sees the header as corrupted.

I now made 4.0 to issue a warning in such a case: "Table file %s was created in MySQL 4.1+, use REPAIR TABLE ... USE_FRM to recreate it as a valid MySQL 4.0 table"