Bug #5327 index corruption after OPTIMIZE TABLE (fulltext indexes)
Submitted: 31 Aug 2004 22:00 Modified: 3 Sep 2004 21:29
Reporter: Timothy Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1.4 OS:FreeBSD (FreeBSD 5.2, Windows XP)
Assigned to: Sergei Golubchik CPU Architecture:Any

[31 Aug 2004 22:00] Timothy Smith
Description:
A table with many indexes and several fulltext indexes, when optimized, becomes corrupt.

Here is the output of the test case script:

tim@sand:m/csc/3476$ mysql test < optimize_test.sql 
Table   Op      Msg_type        Msg_text
optimize_test.refs      check   status  OK
Table   Op      Msg_type        Msg_text
optimize_test.refs      optimize        error   Found key at page 14336 that points to record outside datafile
optimize_test.refs      optimize        status  Operation failed
Table   Op      Msg_type        Msg_text
optimize_test.refs      check   warning Table is marked as crashed and last repair failed
optimize_test.refs      check   error   Found key at page 14336 that points to record outside datafile
optimize_test.refs      check   error   Corrupt

How to repeat:
See attached script.  I ran it on FreeBSD 5.2; the customer ran it on Windows XP and Mac OS X

Suggested fix:
unknown
[2 Sep 2004 14:19] Sergei Golubchik
did you forget to attach the script ?
[2 Sep 2004 20:06] Timothy Smith
Serg, I'm sorry.  I marked it as "visible to developers only", and for some reason it didn't show up.  I've sent you a private e-mail about it.

Timothy
[3 Sep 2004 21:29] Sergei Golubchik
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

fixed in 4.1.5