audit log doesn't record everything

Bug #1617227 reported by Ian Gates
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
New
Undecided
Unassigned

Bug Description

I have a MySQL database 5.5.47 and have installed the audit log plugin (ver 0.2 | type_ver 3.1 | library_vers 1.3)

When I log into my test database using mysql workbench, and I make changes to my table (Insert / update / delete ). If I type it onto the result pane and press Apply > Apply, then the query is recorded into the audit log file with a command class of 'error'.

If I execute the query directly from the SQL tab then it is recorded correctly.

examples:
1) executed via workbenches graphical interface:
<AUDIT_RECORD
  NAME="Execute"
  RECORD="37_2016-08-26T09:05:01"
  TIMESTAMP="2016-08-26T09:07:16 UTC"
  COMMAND_CLASS="error"
  CONNECTION_ID="291"
  STATUS="0"
  SQLTEXT="DELETE FROM `test`.`t1` WHERE `id`='24'"
  USER="root[root] @ [5.6.7.8]"
  HOST=""
  OS_USER=""
  IP="1.2.3.4"
/>

2) executed directly in the SQL tab:
<AUDIT_RECORD
  NAME="Query"
  RECORD="44_2016-08-26T09:05:01"
  TIMESTAMP="2016-08-26T09:07:23 UTC"
  COMMAND_CLASS="delete"
  CONNECTION_ID="291"
  STATUS="0"
  SQLTEXT="DELETE FROM `test`.`t1` WHERE `id`='26'"
  USER="root[root] @ [5.6.7.8]"
  HOST=""
  OS_USER=""
  IP="1.2.3.4"
/>

So when searching the logs for all 'deletes' they don't all show up, unless we search on the SQLTEXT field.

Tags: audit
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

It seems the first case is prepared statement (NAME="Execute") and the second one is query (NAME="Query").

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-3530

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.