Bug #14921 Table corruption when restarting db
Submitted: 14 Nov 2005 12:02 Modified: 14 Nov 2005 16:55
Reporter: [ name withheld ] Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.15 OS:Windows (Windows 2003 Web Edition)
Assigned to: MySQL Verification Team CPU Architecture:Any

[14 Nov 2005 12:02] [ name withheld ]
Description:
After restarting the MySQL service I am getting some tables coming back as corrupted. Before I shut the db down I run a mysqlcheck.exe -c -A -e and everything checks as ok. Once the server is restarted some tables are marked as corrupted.

Example log entry for corrupted table

C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld-nt: Can't open file: 'inetlog.MYI' (errno: 145)

How to repeat:
1. Stop MySQL service using MySQL Administrator
2. Restart service.
3. Run mysqlcheck on databases, some tables will be marked as corrupted.

No pattern as to which tables will be corrupted, some corrupted tables will not have been used for a couple of days before being marked as corrupted.

Suggested fix:
Can't suggest a fix but it looks as though tables are being left open when the db is shutdown and then when it's restarted are marked as corrupted. Problem was happening with v4.1.14 as well so upgraded to 4.1.15 and still have problem.
[14 Nov 2005 12:50] MySQL Verification Team
I was unable to reproduce this issue. Could you please provide the
tables's create table statement which suffers on this issue and the my.ini
file.?

Thanks in advance.
[14 Nov 2005 13:09] [ name withheld ]
Hi, I've attached a copy of the my.ini file I'm using.

I'm not getting the problem consistently on anyone particular table, so I can't really provide you with the create for it.

Is there a safer (i.e more direct?) way to shutdown the MySQL server rather than using the Administrator tool, so that I could try that?

regards,
James
[14 Nov 2005 16:55] MySQL Verification Team
Still I was unable to repeat. You can stop the service issuing from 
a DOS prompt:

net stop mysql_service_name

if you are using the default name:

net stop mysql