Bug #40939 Table corrupted when running Optimize on Compressed MyIsam table
Submitted: 21 Nov 2008 19:57 Modified: 25 Nov 2008 9:08
Reporter: Rod Prince Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version:5.1 RC OS:Linux
Assigned to: CPU Architecture:Any

[21 Nov 2008 19:57] Rod Prince
Description:
I am taking the MySQL Admin class.  I compressed a table using myisampack. I ran myisamchk -rq and then selected some data from the table.  I then ran Optimize on the table.  After I ran this, I got messages that the table had crashed.  myisamchk was unable to repair the table.  I then uncompressed the table.  The table was now looking to be repaired.  However, the data in the table was corrupted show lots of junk characters instead of the original text.

How to repeat:
Take any MyIsam table, compress using myisampack
running Mysql, attempt to run Optimize on the compressed table.
Run myisamchk --unpack on the table.
Run Optimize again or Show Table Status to confirm table is OK
Select data from the table- corrupted
[22 Nov 2008 8:52] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior.

Please indicate accurate version of MySQL server you run and provide output of SHOW CREATE TABLE problem_table
[22 Nov 2008 9:05] Sveta Smirnova
Found bug #40949 while investigating this one.
[24 Nov 2008 18:39] Rod Prince
I got the latest version on the website - NON RPM for Linux x86 from this page:
http://dev.mysql.com/downloads/mysql/5.1.html#linux

I cannot duplicate this myself anymore as this took place in the Mysql DBA class I was taking in Cupertino, CA.  However, the instructor and a couple of students nearby saw the results of this set of actions.
[25 Nov 2008 9:08] Sveta Smirnova
Thank you for the feedback.

This actually can be same problem like crash in  bug #40949. But as not you, neither me can repeat behavior described in her I close this report as "Can't repeat". If you would be able to provide repeatable test case feel free to post it and reopen the report.