audit log doesn't record everything
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=
TIMESTAMP=
COMMAND_
CONNECTION_
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=
TIMESTAMP=
COMMAND_
CONNECTION_
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.
It seems the first case is prepared statement (NAME="Execute") and the second one is query (NAME="Query").