Merge lp:~sergei.glushchenko/percona-server/5.5-ps-bug1363370 into lp:percona-server/5.5
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Laurynas Biveinis on 2014-09-26 | ||||
Approved revision: | 692 | ||||
Merged at revision: | 701 | ||||
Proposed branch: | lp:~sergei.glushchenko/percona-server/5.5-ps-bug1363370 | ||||
Merge into: | lp:percona-server/5.5 | ||||
Diff against target: |
235 lines (+78/-26) 8 files modified
mysql-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) |
||||
To merge this branch: | bzr merge lp:~sergei.glushchenko/percona-server/5.5-ps-bug1363370 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Laurynas Biveinis (community) | 2014-09-01 | Approve on 2014-09-26 | |
Review via email:
|
Description of the change
Bug 1363370: Audit plugin rotates file in middle of audit
Audit record can be split between two files when logging is done to
file with ASYNCHRONOUS strategy and log rotation turned on.
The cause is that logging is done via ring buffer and log record in
the buffer can be wrapped at the end of the buffer. Incomplete
record will be written into log file. If file is exceeded the size
limit, it will be rotated splitting the record into two files.
Fix is to let the log write function to know that record is
incomplete so it will skip log rotation.
http://
Removed debug fprintf
http://
- The testcase needs to count that the actual audit files present >= 2, or
it will pass the same if the log rotate does not happen at all.
Hi Laurynas,
Added condition for files count into the test case
http://
fprintf(stderr, "debug foo") left in