Bug #76942 Undelete ib_logfiles before shutdown
Submitted: 5 May 2015 18:25
Reporter: Christopher Shumake Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[5 May 2015 18:25] Christopher Shumake
Description:
One of the common occurrences on Freenode is that a user will drop by and, after some questioning, admits that they deleted some key portion of the database file structure because they didn't know what it was. 

My feature request is that innodb should check its key files (ibdata1, ib_logfile?) to see if they've been deleted before shutdown. 

If that haven't, shutdown.

If they have, recover the file (possibly from the /proc/<pid>/fd location) in some fast manner and throw as much output as will appropriately inform the user that just tried deleting those files to the error log and stdout and stderr before shutting down the instance.

The action and output should, of course, be configurable for those of us setting up and tearing down instances programmatically.

Thanks.

How to repeat:
Hang out on freenode's #mysql room for a few months, watch the cases roll in

Suggested fix:

Recover deleted files before shutdown and educate user through verbose output.