Bug #50011 Missing InnoDB tablespace when logs exist should stop MySQL
Submitted: 31 Dec 2009 14:39 Modified: 31 Dec 2009 15:01
Reporter: Andrew Hutchings Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Triage: Needs Triage: D5 (Feature request)

[31 Dec 2009 14:39] Andrew Hutchings
Description:
If an InnoDB tablespace is missing but the logs still exist and error is generated but MySQL does not stop:

091230 13:22:59  mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
091230 13:23:07  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.
091230 13:23:07 [Note] /usr/sbin/mysqld: ready for connections.

Subsequent starts will crash processing logs.

How to repeat:
Start mysqld
Stop mysqld
Delete ibdata1
Start mysqld
* Error here but mysqld starts
Stop mysqld
Start mysqld
* InnoDB fails when processing logs

Suggested fix:
Force crash upon first condition
[31 Dec 2009 15:01] Andrew Hutchings
Duplicate of bug #19027

Using InnoDB plugin with innodb=FORCE stops this happening