Audit log in ASYNC mode should not skip log records which don't fit into log buffer

Bug #1588447 reported by Sergei Glushchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Fix Committed
High
Sergei Glushchenko
5.6
Fix Released
High
Sergei Glushchenko
5.7
Fix Released
High
Sergei Glushchenko

Bug Description

It wasn't an issue when audit log records were truncated, but it might become an issue.

int audit_log_buffer_write(audit_log_buffer_t *log, const char *buf, size_t len)
{
  if (len > log->size)
    return(1);

has to be replaced with something like

  if (len > log->size)
  {
    if (!log->drop_if_full)
    {
      mysql_mutex_lock(&log->mutex);
      log->write();
      mysql_mutex_unlock(&log->mutex);
    }
    return(0);
  }

Tags: audit
summary: - Audit log in SEMISYNC mode should not skip log records which don't fit
- into log buffer
+ Audit log in ASYNC mode should not skip log records which don't fit into
+ log buffer
tags: added: audit
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-988

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.