Bug #92 myisamchk -R corrupts tables with Full-text index
Submitted: 22 Feb 2003 2:58 Modified: 22 Feb 2003 7:03
Reporter: Alexander Keremidarski Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version: OS:
Assigned to: Sergei Golubchik CPU Architecture:Any

[22 Feb 2003 2:58] Alexander Keremidarski
myisamchk -R 1 on table with PK and FullText key causes corruption

How to repeat:
DROP TABLE IF EXISTS usrProfileTable2;
CREATE TABLE usrProfileTable2 (
  usrName varchar(40) NOT NULL default '',
  music text,
  PRIMARY KEY  (usrName),
  FULLTEXT KEY music (music)

INSERT INTO usrProfileTable2 VALUES ('amrisen','jag gillar pop musik.');
INSERT INTO usrProfileTable2 VALUES ('amro','markolio');
INSERT INTO usrProfileTable2 VALUES ('Amy-Ery90','MP3/kPOP/kRB');
INSERT INTO usrProfileTable2 VALUES ('Amtil','E.M.M.A');

Shut down mysqld
myisamchk -R 1 /var/lib/mysql/kamrat/usrProfileTable2.MYI

Suggested fix:
Prevent myisamchk -R on tables with Full-Text keys

Use ALTER TABLE ... ORDER BY ... instead
[22 Feb 2003 7:03] Sergei Golubchik