Bug #29299 repeatable myisam fulltext index corruption
Submitted: 22 Jun 2007 10:02 Modified: 7 Jul 2007 19:03
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: MyISAM storage engine Severity:S1 (Critical)
Version:5.0.44BK OS:Any
Assigned to: Sergey Vojtovich CPU Architecture:Any
Tags: bfsm_2007_06_28, corruption, fulltext, myisam

[22 Jun 2007 10:02] Shane Bester
I got a repeating corruption when running some simple statements against a table with fulltext indexes:

06 threads running, 0001044 successful queries.  0000000 failed queries (87.000000 QPS).
query failed (126) - Incorrect key file for table '.\test\tbl_char.MYI'; try to repair it: delete quick from tbl_char orde [...]
query failed (126) - Incorrect key file for table '.\test\tbl_char.MYI'; try to repair it: delete from tbl_char order by r [...]
waiting for threads to finish

How to repeat:
will upload a testcase later

Suggested fix:
[22 Jun 2007 10:56] MySQL Verification Team
uncompress, and import into 5.0.44 using mysql command line client

Attachment: bug29299_testcase.sql.bz2 (application/octet-stream, text), 146.65 KiB.

[22 Jun 2007 10:57] MySQL Verification Team
shell>mysql -uroot test <bug29299_testcase.sql

Table   Op      Msg_type        Msg_text
test.tbl_char   check   status  OK
Table   Op      Msg_type        Msg_text
test.tbl_char   check   error   Key in wrong position at page 45056
test.tbl_char   check   error   Corrupt
ERROR 145 (HY000) at line 24: Table '.\test\tbl_char' is marked as crashed and should be repaired
[22 Jun 2007 11:00] MySQL Verification Team
since i don't know which index is getting corrupted and don't know how to find out, i couldn't easily reduce the number of columns in the table. sorry :-/  Maybe the fix for #28414 will provide more info one day :)
[22 Jun 2007 11:04] MySQL Verification Team
For some reason, I couldn't reproduce the corruption on 5.1.20.
[27 Jun 2007 14:07] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


ChangeSet@1.2493, 2007-06-27 18:10:19+05:00, svoj@mysql.com +3 -0
  BUG#29299 - repeatable myisam fulltext index corruption
  Fulltext index may get corrupt by certain gbk characters.
  The problem was that when skipping leading non-true-word-characters,
  we assumed that these characters are always 1 byte long. This is not
  the case with gbk character set, since non-true-word-characters may
  be 2 bytes long.
  Affects 5.0 only.
[7 Jul 2007 16:34] Bugs System
Pushed into 5.1.21-beta
[7 Jul 2007 16:35] Bugs System
Pushed into 5.0.46
[7 Jul 2007 19:03] Paul DuBois
Noted in 5.0.46, 5.1.21 changelogs.

FULLTEXT indexes could be corrupted by certain gbk characters.