Bug #72515 | Audit log plugin generates error when restarting crashed server | ||
---|---|---|---|
Submitted: | 2 May 2014 15:34 | Modified: | 4 May 2014 7:07 |
Reporter: | Nicolas De Rico | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Logging | Severity: | S4 (Feature request) |
Version: | 5.6 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | audit, Audit plugin, MySQL, server |
[2 May 2014 15:34]
Nicolas De Rico
[2 May 2014 17:33]
Todd Farmer
Hello Nicolas, Thanks for your bug report. This behavior is consistent with the documentation: If the log file exists at open time, the plugin checks whether the file ends with an </AUDIT> tag and truncates it if so before writing any <AUDIT_RECORD> elements. If the log file exists but does not end with </AUDIT> or the </AUDIT> tag cannot be truncated, the plugin considers the file malformed and fails to initialize. This can occur if the server crashes or is killed with the audit log plugin running. No logging occurs until the problem is rectified. Check the error log for diagnostic information: [ERROR] Plugin 'audit_log' init function returned error. To deal with this problem, you must either remove or rename the malformed log file and restart the server. http://dev.mysql.com/doc/refman/5.5/en/audit-log-plugin-logging-control.html This exists in part to prevent multiple mysqld instances from writing to the same audit log file. It does require consideration in a crash recovery scenario, but the error message should provide meaningful diagnostic information when the server does not restart in an automated manner. Given that this is documented (and intentional) behavior, I don't think this is a bug. However, perhaps it's a viable feature request to allow configuration of the audit log plugin such that missing XML close tags don't prevent startup. Do you agree with that approach?
[2 May 2014 17:37]
Nicolas De Rico
Yes absolutely. I will change to feature request.