Audit plugin API: no MYSQL_AUDIT_GENERAL_LOG notifications with general log off
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://
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://
audit notifications only occurs for MYSQL_AUDIT_
A short discussion on this can be found here (see the 2 comments):
http://
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
- Alexey Kopytov (community): Approve
- Laurynas Biveinis (community): Needs Fixing
-
Diff: 185 lines (+93/-14)5 files modifiedmysql-test/r/percona_bug1182535.result (+24/-0)
mysql-test/t/percona_bug1182535-master.opt (+1/-0)
mysql-test/t/percona_bug1182535.test (+48/-0)
sql/log.cc (+8/-10)
sql/sql_audit.h (+12/-4)
- Alexey Kopytov (community): Approve
- Laurynas Biveinis (community): Needs Fixing
-
Diff: 318 lines (+145/-47)8 files modifiedmysql-test/r/percona_bug1182535.result (+24/-0)
mysql-test/t/percona_bug1182535-master.opt (+1/-0)
mysql-test/t/percona_bug1182535.test (+48/-0)
sql/log.cc (+8/-10)
sql/sql_audit.cc (+0/-21)
sql/sql_audit.h (+51/-4)
sql/sql_parse.cc (+3/-2)
sql/sql_prepare.cc (+10/-10)
tags: | added: upstream |
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.