Bug #21107 Comment and error message in myisampack and myisamchck are misleading
Submitted: 18 Jul 2006 8:14 Modified: 25 Aug 2006 15:29
Reporter: Oli Sennhauser Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.0.22 OS:Any (any)
Assigned to: CPU Architecture:Any
Tags: error message, myisamcheck, myisampack

[18 Jul 2006 8:14] Oli Sennhauser
Description:
When using myisampack and myisamcheck the comments from the first tool leads to wrong usage of the second tool and this gives a bad error message.

How to repeat:
# myisampack test.MYI
Compressing test.MYD: (2632928 records)
- Calculating statistics
- Compressing file
73.35%
Remember to run myisamchk -rq on compressed tables

#> myisamchk -rq test.MYD
myisamchk: error: 'test.MYD' is not a MyISAM-table

Suggested fix:
Tool should work without being interested in extension. E.g.

# myisampack test

should look for the appropriate file (test.MYI or test.MYD)

Comment should remember that you should use Index file and not table file.

And error message is completly wrong.
[18 Jul 2006 11:11] MySQL Verification Team
Thank you for the bug report.
[25 Aug 2006 15:29] Sergei Golubchik
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/

See http://dev.mysql.com/doc/refman/5.0/en/myisampack.html and http://dev.mysql.com/doc/refman/5.0/en/myisamchk.html:
"
Invoke myisampack like this:

shell> myisampack [options] file_name ...

Each filename argument should be the name of an index (.MYI) file. If you are not in the database directory, you should specify the pathname to the file. It is permissible to omit the .MYI extension.
"

So,

# myisampack test

should work perfectly well.

And error message is correct - try 'file test.*' to see that while MYI and frm files are recognized as MySQL files, file MYD file contain only data, there's no way to know whether it is data for a table, or a copy of /etc/passwd