Audit plugin API: no MYSQL_AUDIT_GENERAL_LOG notifications with general log off

Bug #1182535 reported by Sergei Glushchenko on 2013-05-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server
Status tracked in 5.6
5.1
Undecided
Unassigned
5.5
Medium
Sergei Glushchenko
5.6
Medium
Sergei Glushchenko

Bug Description

This is a reference to upstream bug http://bugs.mysql.com/bug.php?id=60782.

Description:
When writing audit plugins it is not possible to get notifications for general-log events without enabling the general-log.

As described here:
http://dev.mysql.com/doc/refman/5.5/en/writing-audit-plugins.html
audit notifications only occurs for MYSQL_AUDIT_GENERAL_LOG events with the general_log enabled. It would presumably be more useful for those notifications to be generated regardless of the general_log being enabled or not.

A short discussion on this can be found here (see the 2 comments):
http://karlssonondatabases.blogspot.com/2010/03/more-on-mysql-audit-plugin-interface.html

How to repeat:
It is documented behavior.

Suggested fix:
Perhaps as described in the linked blogpost:
Have the general_log variables have 3 values (ON, AUDIT_ONLY and OFF).

Related branches

lp:~sergei.glushchenko/percona-server/5.5-ps-bug1182535
Merged into lp:percona-server/5.5 at revision 637
Alexey Kopytov: Approve on 2014-03-16
Laurynas Biveinis: Needs Fixing on 2013-06-14
lp:~sergei.glushchenko/percona-server/5.6-ps-bug1182535
Merged into lp:percona-server at revision 558
Alexey Kopytov: Approve on 2014-03-16
Laurynas Biveinis: Needs Fixing on 2013-06-14
tags: added: upstream
Alexey Kopytov (akopytov) wrote :

Hm, the comment got lost. There's no need for another general_log value. The server should just call mysql_audit_general_log() even if the general log is disabled.

Marking as Invalid for 5.1 as it appears that no audit plugins can be written for 5.1.
http://dev.mysql.com/doc/refman/5.1/en/writing-plugins.html

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

Other bug subscribers

Remote bug watches

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