Bug #27090 Error log overwritten on crash
Submitted: 13 Mar 2007 14:59 Modified: 13 Mar 2007 16:37
Reporter: Guillaume Lefranc Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.1.16-log OS:Linux (Ubuntu 6.06 LTS)
Assigned to: CPU Architecture:Any

[13 Mar 2007 14:59] Guillaume Lefranc
Description:
Mysql error log is overwritten whenever the server crashes.

Not sure if it's normal 5.1 behavior?

How to repeat:
Crash the DB voluntarily. I usually do huge FEDERATED queries for that :)

Example log after a crash:

root@dblog-10:/data/mysql# head dblog-10.err

Number of processes running now: 0
070313 15:37:32  mysqld restarted
070313 15:37:32 [Warning] Although a path was specified for the --log-slow-queries option, log tables are used. To enable logging to files use the --log-output option.
070313 15:37:33  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...
070313 15:37:39  InnoDB: Starting log scan based on checkpoint at
[13 Mar 2007 16:35] Miguel Solorzano
Thank you for the bug report. I was unable to repeat on Ubuntu 6.10
32-bit. I crashed the server running the test case of bug:
http://bugs.mysql.com/bug.php?id=27079

miguel@light:~/dbs/5.1$ cat var/light.err 
070313 13:26:11  InnoDB: Started; log sequence number 0 136855
070313 13:26:11 [Note] libexec/mysqld: ready for connections.
Version: '5.1.16-beta-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
070313 13:26:11 [Note] SCHEDULER: Loaded 2 events
070313 13:27:42 [Note] Got signal 15 to shutdown mysqld
070313 13:27:42 [Note] libexec/mysqld: Normal shutdown

070313 13:27:42 [Note] SCHEDULER: Purging queue. 2 events
070313 13:27:42  InnoDB: Starting shutdown...
070313 13:27:45  InnoDB: Shutdown completed; log sequence number 0 136855
070313 13:27:45 [Note] libexec/mysqld: Shutdown complete

070313 13:28:05  InnoDB: Started; log sequence number 0 136855
070313 13:28:05 [Note] libexec/mysqld: ready for connections.
Version: '5.1.16-beta-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
070313 13:28:05 [Note] SCHEDULER: Loaded 2 events
mysqld got signal 11;
[13 Mar 2007 16:37] Guillaume Lefranc
Miguel,

We use 64-bit versions, not sure if that is relevant to the bug.
Will try the bug case by myself and keep you posted.