Bug #56851 Default innodb_log_file_size in my.ini can cause MySQL service startup to fail
Submitted: 18 Sep 2010 15:30 Modified: 4 Oct 2012 6:59
Reporter: Victor Kirkebo Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Config Wizard Severity:S3 (Non-critical)
Version:5.1.x OS:Windows
Assigned to: CPU Architecture:Any
Tags: innodb_log_file_size, mysql service

[18 Sep 2010 15:30] Victor Kirkebo
Description:
The Windows Config Wizard generates my.ini with some default settings e.g. innodb_log_file_size=10M.
A user may change innodb_log_file_size (e.g to 20M) in my.ini and regenerate the log files ib_logfile0 and ib_logfile1. If the user uninstalls an msi installation the data files will not be deleted. When installing a new msi package the Config Wizard may be used to choose the existing datadir. The problem is that the Config Wizard will fail to start the MySQL service because it will generate a new my.ini file where innodb_log_file_size=10M which will cause the error message InnoDB: Error: log file .\ib_logfile0 is of different size 0 20971520 bytes than specified in the .cnf file 0 10485760 bytes!

Some notes:
1) The Config Wizard would not have failed to start the MySQL Service had it been able to check if the log files already existed and then set innodb_log_file_size accordingly. Alternatively the Config Wizard could skip the service startup and instruct the user to correct the my.ini file manually.

2) In general when something goes wrong: If the Config Wizard could point users to where to look for error messages that could be helpful for unexperienced users in finding out what went wrong.

3) It seems the Event Viewer only displays mysqld errors. The InnoDB error mentioned above is not displayed.

How to repeat:
Install an msi package using default options in Config Wizard
Stop the MySQL service
Change the value of innodb_log_file_size in my.ini
Delete ib_logfile0 and ib_logfile1
Restart the MySQL service
Uninstall the msi
Install an msi package again using default options in Config Wizard
Note that the Config Wizard fails to start the MySQL Service
[18 Sep 2010 21:21] Sveta Smirnova
Thank you for the report.

What is the change between this one and bug #56821?
[19 Sep 2010 5:17] Victor Kirkebo
Hi Sveta,
Bug #56821 only applies to 5.1.51 but unfortunately the first part of that bug report only shows that I did the mistake of not deleting an existing datadir with logfiles with sizes different than 10M before doing the new installation. You pointed out that to me and I have decided to create this new bug report which should be seen as a feature request for the Windows Config Wizard. I will add a comment to bug #56821 to clarify.
[20 Sep 2010 17:05] Sveta Smirnova
Thank you for the feedback.

Set to "Verified" as Elena verified it already.
[20 Sep 2010 17:07] Sveta Smirnova
Both bugs look very similar to bug #42820
[9 Oct 2010 5:18] Sveta Smirnova
Bug #17730 was marked as duplicate of this one.
[4 Oct 2012 6:59] Marko Mäkelä
This is a duplicate of Bug#13494, which will be fixed in MySQL 5.6.8.