Audit plugin API: no MYSQL_AUDIT_GENERAL_LOG notifications with general log off

Bug #1182535 reported by Sergei Glushchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Sergei Glushchenko
5.1
Invalid
Undecided
Unassigned
5.5
Fix Released
Medium
Sergei Glushchenko
5.6
Fix Released
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).

Tags: upstream

Related branches

tags: added: upstream
Revision history for this message
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.

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

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

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

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.