diff options
author | Sergey Vojtovich <svoj@sun.com> | 2010-04-15 13:05:17 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@sun.com> | 2010-04-15 13:05:17 +0400 |
commit | 8e7939167d3fd3482038fbc052672e049b52c667 (patch) | |
tree | e6172f142ebc0e905e7330a98779304ea71c9acc /sql/sql_audit.cc | |
parent | 1cdc0b3a4cb9a338c62be9375f951bb905fc65f6 (diff) | |
download | mariadb-git-8e7939167d3fd3482038fbc052672e049b52c667.tar.gz |
BUG#47059 - In audit plugin I cannot see the event subclasses,
e.g.MYSQL_AUDIT_GENERAL_ERROR
General audit API (MYSQL_AUDIT_GENERAL_CLASS) didn't expose event
subclass to plugins.
This patch exposes event subclass to plugins via
struct mysql_event_general::event_subclass.
This change is not compatible with existing general audit plugins.
Audit interface major version has been incremented.
include/mysql/plugin_audit.h:
Expose event subclass to audit general plugins.
plugin/audit_null/audit_null.c:
Added distinct counters for general event sub-classes.
Removed printf() from deinit(). One can easily see number of
calls via status variables.
To make code nicer, modified class mask to use macro instead
of hardcoded number.
Incremented audit plugin minor version.
sql/sql_audit.cc:
Expose event subclass to audit general plugins.
Diffstat (limited to 'sql/sql_audit.cc')
-rw-r--r-- | sql/sql_audit.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_audit.cc b/sql/sql_audit.cc index 5190cba64de..412de9225e8 100644 --- a/sql/sql_audit.cc +++ b/sql/sql_audit.cc @@ -65,6 +65,7 @@ static void general_class_handler(THD *thd, uint event_subtype, va_list ap) { mysql_event_general event; event.event_class= MYSQL_AUDIT_GENERAL_CLASS; + event.event_subclass= event_subtype; event.general_error_code= va_arg(ap, int); event.general_thread_id= thd ? thd->thread_id : 0; event.general_time= va_arg(ap, time_t); |