Audit plugin rotates file in middle of audit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
High
|
Sergei Glushchenko | ||
5.5 |
Fix Released
|
High
|
Sergei Glushchenko | ||
5.6 |
Fix Released
|
High
|
Sergei Glushchenko |
Bug Description
I use the Percona Audit Log Plugin, and have set the following variables (amongst others):
audit_log_
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_
head of audit.log
,"ip":"127.0.0.1"}}
{"audit_
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
- Laurynas Biveinis (community): Approve
-
Diff: 235 lines (+78/-26)8 files modifiedmysql-test/r/audit_log_rotate.result (+1/-0)
mysql-test/t/audit_log_rotate-master.opt (+8/-0)
mysql-test/t/audit_log_rotate.test (+29/-0)
plugin/audit_log/audit_file.c (+10/-6)
plugin/audit_log/buffer.c (+7/-8)
plugin/audit_log/buffer.h (+3/-1)
plugin/audit_log/file_logger.c (+14/-10)
plugin/audit_log/logger.h (+6/-1)
- Laurynas Biveinis (community): Approve
-
Diff: 1028 lines (+68/-427)10 files modifiedmysql-test/r/audit_log_rotate.result (+1/-0)
mysql-test/t/audit_log_rotate-master.opt (+8/-0)
mysql-test/t/audit_log_rotate.test (+29/-0)
plugin/audit_log/audit_file.c (+0/-200)
plugin/audit_log/audit_handler.h (+0/-116)
plugin/audit_log/audit_syslog.c (+0/-91)
plugin/audit_log/buffer.c (+7/-8)
plugin/audit_log/buffer.h (+3/-1)
plugin/audit_log/file_logger.c (+14/-10)
plugin/audit_log/logger.h (+6/-1)
Would you mind to post other settings of audit plugin?