Bug #31496 Restart of MySQL service corrupted the database
Submitted: 9 Oct 2007 23:51 Modified: 10 Nov 2007 0:28
Reporter: cary sweet Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Installing Severity:S1 (Critical)
Version:5.0.45 OS:Windows (Win XP)
Assigned to: CPU Architecture:Any

[9 Oct 2007 23:51] cary sweet
Description:
Database is corrupted and the service cannot be started

How to repeat:
Installed MySQL at home on my laptop.
Migrated an 800MB oracle db to it.
Brought the laptop to work
Used the Server Instance Configuration to make root accessible remotely and the service never came back up.
Here is what existed in the C:\Program Files\MySQL\MySQL Server 5.0\data\COMPUTERNAME.err file:

071009 14:43:24  InnoDB: Starting shutdown...
071009 14:43:26  InnoDB: Shutdown completed; log sequence number 0 43655
071009 14:43:26 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown complete

InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
071009 14:43:27  InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Error: all log files must be created at the same time.
InnoDB: All log files must be created also in database creation.
InnoDB: If you want bigger or smaller log files, shut down the
InnoDB: database and make sure there were no errors in shutdown.
InnoDB: Then delete the existing log files. Edit the .cnf file
InnoDB: and start the database again.
071009 14:43:27 [ERROR] Default storage engine (InnoDB) is not available
071009 14:43:27 [ERROR] Aborting

071009 14:43:27 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown complete

071009 14:43:54  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
071009 14:43:54  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43655.
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
InnoDB: Page directory corruption: supremum not pointed to
071009 14:43:54  InnoDB: Page dump in ascii and hex (16384 bytes):
 len 16384; InnoDB: End of page dump
071009 14:43:54  InnoDB: Page checksum 1575996416, prior-to-4.0.14-form checksum 1371122432
InnoDB: stored checksum 0, prior-to-4.0.14-form stored checksum 0
InnoDB: Page lsn 0 0, low 4 bytes of lsn at page end 0
InnoDB: Page number (if stored to page already) 0,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page directory corruption: supremum not pointed to
071009 14:43:54  InnoDB: Page dump in ascii and hex (16384 bytes):
 len 16384; InnoDB: End of page dump
071009 14:43:54  InnoDB: Page checksum 1575996416, prior-to-4.0.14-form checksum 1371122432
InnoDB: stored checksum 0, prior-to-4.0.14-form stored checksum 0
InnoDB: Page lsn 0 0, low 4 bytes of lsn at page end 0
InnoDB: Page number (if stored to page already) 0,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
071009 14:43:54 [ERROR] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Got signal 11. Aborting!

071009 14:43:54 [ERROR] Aborting

071009 14:43:54 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown complete

Note: Uninstalling and reinstalling MySQL produced the same Service startup failure.

Suggested fix:
Completely remove your database and rebuild from scratch

C:\Program Files\MySQL\MySQL Server 5.0\data still has mysql dir and contents, part of the new catalog/schema/database I created to import the Oracle db into, ib_logfile0, ib_logfil1, ibdata1 files in it after the removal of service and the uninstall.  This is probably why the reinstall does not work without cleaning the dirs.  Removal of the garbage files and reinstalling over clean directories causes the installation and the service to be valid again.
[10 Oct 2007 0:03] MySQL Verification Team
Thank you for the bug report. That install was an upgrade over older 
version (4.1)?. Thanks in advance.
[10 Oct 2007 0:07] cary sweet
This was a first time install on this computer
[10 Oct 2007 0:14] MySQL Verification Team
Thank you for the feedback. If you don't have data is possible for you to
delete the InnoDB files i.e:

c:\Program Files\MySQL\MySQL Server 5.0\data>dir ib*
 O volume na unidade C não tem nome.
 O Número de Série do Volume é 6418-7E81

 Pasta de c:\Program Files\MySQL\MySQL Server 5.0\data

09/10/2007  20:48        52.428.800 ibdata1
09/10/2007  20:50        25.165.824 ib_logfile0
07/10/2007  20:06        25.165.824 ib_logfile1
               3 arquivo(s)    102.760.448 bytes
               0 pasta(s)   58.862.931.968 bytes disponíveis

c:\Program Files\MySQL\MySQL Server 5.0\data>

and try to start the server again?
[10 Oct 2007 0:22] cary sweet
This is what I did in the Suggested Fix section and I have been re-executing the migration since (Not sure if the IP address change going from home to work was once of the factors of the crash
[10 Oct 2007 0:28] MySQL Verification Team
So after that is all ok?. I can't not say you what was the reason for that
behavior and I don't have a repeatable test case.
[11 Nov 2007 0:00] 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".