mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
|
||||
#define MYSQL_AUDIT_CLASS_MASK_SIZE 1
|
||||
|
||||
#define MYSQL_AUDIT_INTERFACE_VERSION 0x0100
|
||||
#define MYSQL_AUDIT_INTERFACE_VERSION 0x0200
|
||||
|
||||
/*
|
||||
The first word in every event class struct indicates the specific
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
struct mysql_event
|
||||
{
|
||||
int event_class;
|
||||
unsigned int event_class;
|
||||
};
|
||||
|
||||
|
||||
@ -52,7 +52,8 @@ struct mysql_event
|
||||
|
||||
struct mysql_event_general
|
||||
{
|
||||
int event_class;
|
||||
unsigned int event_class;
|
||||
unsigned int event_subclass;
|
||||
int general_error_code;
|
||||
unsigned long general_thread_id;
|
||||
const char *general_user;
|
||||
|
Reference in New Issue
Block a user