Bug #65906 | Need indication of whether the server has had to perform recovery on startup | ||
---|---|---|---|
Submitted: | 16 Jul 2012 6:01 | Modified: | 16 Jul 2012 11:19 |
Reporter: | Simon Mudd (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Options | Severity: | S4 (Feature request) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any | |
Tags: | windmill |
[16 Jul 2012 6:01]
Simon Mudd
[16 Jul 2012 6:22]
MySQL Verification Team
Just an idea, perhaps implementing an option called --shutdown-file (the opposite of --init-file) could be workable solution. On normal shutdown server would execute some SQL to record normal shutdown. If the shutdown SQL was not executed it means server crashed.
[16 Jul 2012 7:50]
Simon Mudd
Basically use the way MyISAM detects "not-cleanly shutdown" tables? Yes, I see that as being a valid thing to do. Mark the file with an "open" state, and at the end of the shutdown sequence mark it as "shutdown cleanly". Then check on startup if the state was shutdown cleanly and indicate this. That would certainly help catch an "unexpected crash" of mysqld, but nevertheless having engine specific information would also be useful. So generally I'm not too worried about the exact mechanism but just a means of detecting this situation, and avoid horrible parsing of the log-error file for stuff that looks like a possible crash.