Hi all, I'd like to thank Gordon Burditt for responding to my question. (Original question below.)
It seems I was invoking myisamchk incorrectly. Rather than doing: # myisamchk mailtable ...I was specifying both the data and index files, like this: # myisamchk mailtable.MYD mailtable.MYI I think what confused me was this sentence from the manual (Chapter 15.1 Using myisamchk for Table Maintenance and Crash Recovery, 2nd paragraph): "To check/repair MyISAM tables (.MYI and .MYD) you should use the myisamchk utility." Thanks, Gordon, for clarifying that for me. :> Best, /Rob At 00:43 -0500 2001/10/21, Gordon Burditt wrote: >As near as I can tell, you DON'T pass *.MYD files to myisamchk, just >*.MYI files. What's wrong with the *.MYD file is that it is not >and never was an index. --- original question --------------- At 15:50 -0400 2001/10/20, Robert Alexander wrote: >Hi all, > >I'm in the process of writing a searchable mailing list archive in Perl & MySQL. > >I'm using Monty's old mail_to_db.pl script (which I got from the MySQL site long ago) >to load emails from their mailbox into MySQL. Runs just fine, BTW. > >However, when I run myisamchk on the mail table, it says: > >================================================ > ># myisamchk mailtable.MYD mailtable.MYI >myisamchk: error: 'mailtable.MYD' doesn't have a correct index definition. >You need to recreate it before you can do a repair > >--------- > >Checking MyISAM file: mailtable.MYI >Data records: 99 Deleted blocks: 0 >- check file-size >- check key delete-chain >- check record delete-chain >- check index reference >- check data record references index: 1 >- check data record references index: 2 >- check record links > >================================================ > >...but for the life of me, I can't see what's wrong with the index definition. (See >info below.) > >I've read all the pertinent manual chapters (I think), I've dropped and recreated the >table several times, and imported the data by a couple different methods. Still keep >getting the error. The table in question has only 99 records in it right now. > >Can anyone spot what I'm missing? Or point to towards some more info? > >Thanks very much! > >All the best, >/Rob > > >Here's the vital information: > >MySQL 3.23.36. Solaris 8 on a Sun UltraSparc 1. Perl 5.6 > >Table: > >DROP TABLE IF EXISTS mailtable; >CREATE TABLE mailtable ( > msg_nro mediumint unsigned NOT NULL auto_increment, > date DATETIME NOT NULL, > time_zone varchar(6) NOT NULL, > mail_from varchar(120) NOT NULL, > reply varchar(120), > mail_to TEXT, > cc TEXT, > sbj varchar(200), > txt MEDIUMTEXT NOT NULL, > file varchar(32) NOT NULL, > hash INT NOT NULL, >KEY (msg_nro), >PRIMARY KEY (mail_from, date, time_zone, hash) >); > >desc mailtable; >+-----------+-----------------------+------+-----+-------------------- >-+----------------+ >| Field | Type | Null | Key | Default | Extra | >+-----------+-----------------------+------+-----+-------------------- >-+----------------+ >| msg_nro | mediumint(8) unsigned | | MUL | 0 | auto_increment | >| date | datetime | | PRI | 0000-00-00 00:00:00 | > | >| time_zone | varchar(6) | | PRI | | | >| mail_from | varchar(120) | | PRI | | | >| reply | varchar(120) | YES | | NULL | | >| mail_to | text | YES | | NULL | | >| cc | text | YES | | NULL | | >| sbj | varchar(200) | YES | | NULL | | >| txt | mediumtext | | | NULL | | >| file | varchar(32) | | | | | >| hash | int(11) | | PRI | 0 | | >+-----------+-----------------------+------+-----+-------------------- >-+----------------+ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php