26 #define MYSQL_AUDIT_CLASS_MASK_SIZE 1
28 #define MYSQL_AUDIT_INTERFACE_VERSION 0x0301
41 #define MYSQL_AUDIT_GENERAL_CLASS 0
42 #define MYSQL_AUDIT_GENERAL_CLASSMASK (1 << MYSQL_AUDIT_GENERAL_CLASS)
43 #define MYSQL_AUDIT_GENERAL_LOG 0
44 #define MYSQL_AUDIT_GENERAL_ERROR 1
45 #define MYSQL_AUDIT_GENERAL_RESULT 2
46 #define MYSQL_AUDIT_GENERAL_STATUS 3
50 unsigned int event_subclass;
51 int general_error_code;
52 unsigned long general_thread_id;
53 const char *general_user;
54 unsigned int general_user_length;
55 const char *general_command;
56 unsigned int general_command_length;
57 const char *general_query;
58 unsigned int general_query_length;
60 unsigned long long general_time;
61 unsigned long long general_rows;
77 #define MYSQL_AUDIT_CONNECTION_CLASS 1
78 #define MYSQL_AUDIT_CONNECTION_CLASSMASK (1 << MYSQL_AUDIT_CONNECTION_CLASS)
79 #define MYSQL_AUDIT_CONNECTION_CONNECT 0
80 #define MYSQL_AUDIT_CONNECTION_DISCONNECT 1
81 #define MYSQL_AUDIT_CONNECTION_CHANGE_USER 2
85 unsigned int event_subclass;
87 unsigned long thread_id;
89 unsigned int user_length;
90 const char *priv_user;
91 unsigned int priv_user_length;
92 const char *external_user;
93 unsigned int external_user_length;
94 const char *proxy_user;
95 unsigned int proxy_user_length;
97 unsigned int host_length;
99 unsigned int ip_length;
100 const char *database;
101 unsigned int database_length;
125 int interface_version;
126 void (*release_thd)(MYSQL_THD);
127 void (*event_notify)(MYSQL_THD,
unsigned int,
const void *);
128 unsigned long class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE];