Hi! I have a most peculiar problem with a corrupt table.
My situation: I have a mysql server running with several databases, one of them a log database that only have one table with several attributes. I have lots of inserts into this table which grows continuously, now the table size is about 400 MB. Every other day I'm running a batch file to remove older log messages and to optimize the table (with OPTIMIZE TABLE command). My problem: When the log database has grown over 250MB and I run the optimize table command from the batchfile, I get a corrupt table. I can run the recover option that only restores the indeces and the table is up and working again. When checking the table I get the following result: Checking MyISAM file: LogEvents Data records: 784569 Deleted blocks: 0 myisamchk: warning: Table is marked as crashed and last repair failed - check file-size - check key delete-chain - check record delete-chain - check index reference - check data record references index: 1 myisamchk: error: Key in wrong position at page 9251840 - check records and index references myisamchk: error: Record at: 226899000 Can't find key for index: 1 MyISAM-table 'LogEvents' is corrupted Fix it using switch "-r" or "-o" I have turned on the binary log and whenever it fails it has not happend anything out of the ordinary or at a special insert (i'm only doing inserts). I don't get any corrupt table problems on a log database with smaller amount of data ( < 100MB) and not every time I do it on a larger database amount either but it has happend several times.. This problem arise when running optimize table, but another time I was making a huge free text search via the mysqladmin console. This was done while the log database was up and running and inserting a lot of messages, then I got the same problem that the database table got corrupt. It is very easy to repair, but I would gladly find out what the problem is instead so I can try fixing it. Anyone got a clue? I have only three indeces besides the primary key, one on two fields and the rest on single fields. THANKS! /Monika --------------------------------------------------------------------- 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