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 
|                |
+-----------+-----------------------+------+-----+-------------------- 
-+----------------+


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Robert Alexander    ~~   Programmer/Analyst/DBA/Admin
WWW Database Applications    ~~    http://www.ra1.net
Web Software and Hosting   ~~  http://www.workmate.ca

---------------------------------------------------------------------
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

Reply via email to