Bug #600 Error 145 when attempting to access a table
Submitted: 5 Jun 2003 18:17 Modified: 6 Jul 2003 5:30
Reporter: Brian Gleason Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version:4.0.13 mysql-nt binary OS:Windows (W2k Server SP1 and hotfixes)
Assigned to: CPU Architecture:Any

[5 Jun 2003 18:17] Brian Gleason
I am getting the error 145... I stop the database to make sure all connections are killed, restart it, then repair the table and everything seems ok... I am running PHP 4.2.2 with apache 1.3.27 on a Windows 2000 server. My mysql version is 4.0.13 and I am running the mysql-nt.exe binary... Any suggestions would be greatly appreciated to prevent this from continuously happening...

How to repeat:

Suggested fix:
[6 Jun 2003 5:30] Indrek Siitan
Thanks for your bug report. We have received more bug reports about random table corruption in 
4.0, but haven't been able to repeat it ourself yet,  as for most user it happens seldom enough 
(couple of times a month) and they cannot provide a repeatable test case.

How often does it happen on your server? If it happens often enough, here's a procedure what you 
could try, that might really help us:

 (1) If the table gets corrupted, make a backup of all 3 table files in the data
     directory (c:\mysql\databasename) - .MYI, .MYD and .frm.

 (2) Shut down MySQL and fix the table using myisamchk.

 (3) Add the following to c:\my.cnf (create the file, if it doesn't exist yet), into
     the [mysqld] section:

        binlog-do-db=<database where the corrupted table is in>

 (4) Start your server and resume normal operation

 (5) Immediately after restarting the server, take a dump of the database
     corruption is happening in, using mysqldump --opt

 (6) Next time when the table gets corrupted again, send us the following files:
        * the 3 corrupted table files from the first corruption
        * the 3 corrupted table files from the recent corruption
        * database dump generated after the previous corruption
        * database dump generated mysqldump --opt after this corruption
        * binlog files generated by the server

You can zip them into one file and let us know where we can download them, or upload them to 
our FTP site at ftp://support.mysql.com/pub/mysql/secret

I know it's quite much, but this currently sounds like the only chance of getting hold of that bug.
[14 Feb 2005 22:54] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".