Bug #24124 Bouncing server corrupted .frm file for innodb table
Submitted: 9 Nov 2006 3:26 Modified: 11 Nov 2006 23:21
Reporter: Ian Flint Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.24 OS:Linux (Linux (RHEL4 - 2.6.9-22.0.2.EL))
Assigned to: CPU Architecture:Any

[9 Nov 2006 3:26] Ian Flint
I bounced our mysql server to adjust some parameters, and when it came back up, an innodb table had a corrupt .frm file.

Here are the settings I added:

And I deleted the mysql_log_file.

There was an interesting entry in the *.err file when I restarted:

061108 21:04:18  mysqld started
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 67108864 bytes!
061108 21:04:19 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.24-standard-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Edition - Standard (GPL)

How to repeat:
I hope to never repeat this.
[9 Nov 2006 18:13] Hartmut Holzgraefe
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

What to take care of when changing the log file size is documented in the manual.
[9 Nov 2006 20:37] Ian Flint
This is the excerpt from the log on changing the innodb_log_file_size.  It makes no mention of needing to do anything differently than what I did that resulted in my corrupting the database.  In addition, if a condition like this is known to have a significant risk of corrupting data, shouldn't that prevent the startup of the database?

Excerpt from manual section on innodb_log_file_size:

"The size in bytes of each log file in a log group. The combined size of log files must be less than 4GB on 32-bit computers. The default is 5MB. Sensible values range from 1MB to 1/N-th of the size of the buffer pool, where N is the number of log files in the group. The larger the value, the less checkpoint flush activity is needed in the buffer pool, saving disk I/O. But larger log files also mean that recovery is slower in case of a crash."
[9 Nov 2006 20:40] Ian Flint
I'm changing this back from "Not a Bug" to "Open".  I realize that it very well might be changed back, but to me, it seems like this condition should be very easily preventable.
[11 Nov 2006 23:21] Hartmut Holzgraefe
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug.

Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.

See: http://dev.mysql.com/doc/refman/4.1/en/adding-and-removing.html last paragraph