diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-11-08 16:49:07 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-11-08 16:49:07 +0100 |
commit | 53578613e96bb471446e226dbab61c2152232f56 (patch) | |
tree | d01574b6c4091199d68942a71f7e8c574504dcee /sql/sql_audit.h | |
parent | d473199744812ee4af52edfa4b85610d834802ca (diff) | |
download | mariadb-git-53578613e96bb471446e226dbab61c2152232f56.tar.gz |
MDEV-259 audit plugin does not see sub-statements
Diffstat (limited to 'sql/sql_audit.h')
-rw-r--r-- | sql/sql_audit.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/sql_audit.h b/sql/sql_audit.h index 02a63852955..b2ce31f1d26 100644 --- a/sql/sql_audit.h +++ b/sql/sql_audit.h @@ -37,8 +37,16 @@ extern void mysql_audit_acquire_plugins(THD *thd, uint event_class); #ifndef EMBEDDED_LIBRARY extern void mysql_audit_notify(THD *thd, uint event_class, uint event_subtype, ...); + +static inline bool mysql_audit_general_enabled() +{ + return mysql_global_audit_mask[0] & MYSQL_AUDIT_GENERAL_CLASSMASK; +} + #else -#define mysql_audit_notify(...) +static inline void mysql_audit_notify(THD *thd, uint event_class, + uint event_subtype, ...) { } +#define mysql_audit_general_enabled() 0 #endif extern void mysql_audit_release(THD *thd); @@ -53,11 +61,6 @@ static inline uint make_user_name(THD *thd, char *buf) sctx->ip ? sctx->ip : "", "]", NullS) - buf; } -static inline bool mysql_audit_general_enabled() -{ - return mysql_global_audit_mask[0] & MYSQL_AUDIT_GENERAL_CLASSMASK; -} - /** Call audit plugins of GENERAL audit class, MYSQL_AUDIT_GENERAL_LOG subtype. |