Audit plugin rotates file in middle of audit

Bug #1363370 reported by Olaf van Zandwijk on 2014-08-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to
Fix Released
Sergei Glushchenko
Fix Released
Sergei Glushchenko
Fix Released
Sergei Glushchenko

Bug Description

I use the Percona Audit Log Plugin, and have set the following variables (amongst others):

audit_log_rotate_on_size = 104857600
audit_log_rotations = 10

Now, when this filesize is reached the file is rotated, even if that is in the middle of an audit line:

tail of audit.log.01:
{"audit_record":{"name":"Query","record":"3088_2014-08-30T08:00:15","timestamp":"2014-08-30T08:03:30 UTC","command_class":"select","connection_id":"9456","status":0,"sqltext":"....","user":"....","host":"","os_user":""

head of audit.log

That seems a bug to me. I think the file should be rotated in such a way that both files (the current audit file and the rotated one) contain complete audit lines.

Related branches

Would you mind to post other settings of audit plugin?

Olaf van Zandwijk (olafz) wrote :


I'm running server version 5.5.39-36.0-log, Release 36.0, Revision 697 with the following audit plugin settings:

audit_log_handler = FILE
audit_log_strategy = ASYNCHRONOUS
audit_log_file = /path/to/audit.log
audit_log_format = JSON
audit_log_policy = ALL
audit_log_rotate_on_size = 104857600
audit_log_rotations = 10

Percona now uses JIRA for bug reports so this bug report is migrated to:

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers