1#ifndef SQL_AUDIT_INCLUDED
2#define SQL_AUDIT_INCLUDED
43#define AUDIT_EVENT(x) x, #x
61 unsigned long event_subclass,
62 bool check_audited =
true);
85 const char *subclass_name,
int error_code,
86 const char *msg,
size_t msg_len);
113 const char *subclass_name,
int errcode);
127 const char *subclass_name,
145 const char *subclass_name,
const char *database,
146 unsigned int database_length,
const char *
name,
147 unsigned int name_length);
177 const char *subclass_name,
const char *
name,
178 const char *value,
const unsigned int value_length);
190 const char *subclass_name,
const char **argv,
221 const char *subclass_name,
222 const char *database,
239 const char *subclass_name);
256 const char *command_text);
269 const char *subclass_name);
284 const char *subclass_name,
const char *database,
285 const char *
name,
void *parameters);
304 const char *subclass_name,
int status,
const char *
user,
305 const char *
host,
const char *authentication_plugin,
306 bool is_role,
const char *new_user,
307 const char *new_host);
327 const char *subclass_name,
const char *component,
328 size_t component_length,
const char *producer,
329 size_t producer_length,
const char *message,
330 size_t message_length,
332 size_t key_value_map_length);
A set of THD members describing the current authenticated user.
Definition: sql_security_ctx.h:55
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
static int flags[50]
Definition: hp_test1.cc:40
enum_server_command
A list of all MySQL protocol commands.
Definition: my_command.h:48
char * user
Definition: mysqladmin.cc:60
const char * host
Definition: mysqladmin.cc:59
Definition: buf0block_hint.cc:30
mysql_event_global_variable_subclass_t
Events for MYSQL_AUDIT_GLOBAL_VARIABLE_CLASS event class.
Definition: plugin_audit.h:330
mysql_event_server_startup_subclass_t
Events for MYSQL_AUDIT_SERVER_STARTUP_CLASS event class.
Definition: plugin_audit.h:359
mysql_event_general_subclass_t
Events for the MYSQL_AUDIT_GENERAL_CLASS event class.
Definition: plugin_audit.h:112
@ MYSQL_AUDIT_GENERAL_LOG
occurs before emitting to the general query log.
Definition: plugin_audit.h:114
mysql_event_command_subclass_t
Events for MYSQL_AUDIT_COMMAND_CLASS event class.
Definition: plugin_audit.h:423
mysql_event_authentication_subclass_t
Events for MYSQL_AUDIT_AUTHENTICATION_CLASS event class.
Definition: plugin_audit.h:539
mysql_event_authorization_subclass_t
Events for MYSQL_AUDIT_AUTHORIZATION_CLASS event class.
Definition: plugin_audit.h:234
mysql_event_query_subclass_t
Events for MYSQL_AUDIT_QUERY_CLASS event class.
Definition: plugin_audit.h:461
mysql_event_parse_rewrite_plugin_flag
Definition: plugin_audit.h:203
mysql_event_server_shutdown_subclass_t
Events for MYSQL_AUDIT_SERVER_SHUTDOWN_CLASS event class.
Definition: plugin_audit.h:385
mysql_event_parse_subclass_t
Events for MYSQL_AUDIT_PARSE_CLASS event class.
Definition: plugin_audit.h:193
mysql_event_class_t
Audit event classes.
Definition: plugin_audit.h:48
mysql_server_shutdown_reason_t
Server shutdown reason.
Definition: plugin_audit.h:397
mysql_event_stored_program_subclass_t
Events for MYSQL_AUDIT_STORED_PROGRAM_CLASS event class.
Definition: plugin_audit.h:500
mysql_event_connection_subclass_t
Events for MYSQL_AUDIT_CONNECTION_CLASS event class.
Definition: plugin_audit_connection_types.h:37
mysql_event_message_subclass_t
Events for MYSQL_AUDIT_MESSAGE_CLASS event class.
Definition: plugin_audit_message_types.h:41
required uint32 status
Definition: replication_asynchronous_connection_failover.proto:61
size_t make_user_name(Security_context *sctx, char *buf)
Definition: sql_audit.cc:1451
void mysql_audit_enable_auditing(THD *thd)
Enable auditing of the specified THD.
Definition: sql_audit.cc:1177
void mysql_audit_finalize()
Finalize Audit global variables.
Definition: sql_audit.cc:1235
bool is_global_audit_mask_set()
Checks presence of active audit plugin.
Definition: sql_audit.cc:1443
static int mysql_audit_general_log(THD *thd, const char *cmd, size_t cmdlen)
Call audit plugins of GENERAL LOG audit class.
Definition: sql_audit.h:96
#define AUDIT_EVENT(x)
Audit API event to string expanding macro.
Definition: sql_audit.h:43
void mysql_audit_release(THD *thd)
Release any resources associated with the current thd.
Definition: sql_audit.cc:1147
int mysql_audit_notify(THD *thd, mysql_event_general_subclass_t subclass, const char *subclass_name, int error_code, const char *msg, size_t msg_len)
Call audit plugins of GENERAL audit class.
Definition: sql_audit.cc:364
bool is_audit_plugin_class_active(THD *thd, unsigned long event_class)
There's at least one active audit plugin tracking a specified class.
Definition: sql_audit.cc:1432
void mysql_audit_init_thd(THD *thd)
Initialize thd variables used by Audit.
Definition: sql_audit.cc:1186
void mysql_audit_free_thd(THD *thd)
Free thd variables used by Audit.
Definition: sql_audit.cc:1197
int initialize_audit_plugin(st_plugin_int *plugin)
Initialize an Audit plug-in.
Definition: sql_audit.cc:1246
int finalize_audit_plugin(st_plugin_int *plugin)
Finalize an Audit plug-in.
Definition: sql_audit.cc:1305
void mysql_audit_initialize()
Initialize Audit global variables.
Definition: sql_audit.cc:1222
int mysql_audit_acquire_plugins(THD *thd, mysql_event_class_t event_class, unsigned long event_subclass, bool check_audited=true)
Acquire audit plugins.
Definition: sql_audit.cc:1087
int mysql_audit_table_access_notify(THD *thd, Table_ref *table)
Call audit plugins of TABLE ACCESS audit class events for all tables available in the list.
Definition: sql_audit.cc:581
static const size_t MAX_USER_HOST_SIZE
Definition: sql_audit.h:38
case opt name
Definition: sslopt-case.h:33
Definition: mysql_lex_string.h:40
Structure that stores key-value pair of the MYSQL_AUDIT_MESSAGE_CLASS event class.
Definition: plugin_audit_message_types.h:64
Definition: sql_plugin_ref.h:45
st_mysql_plugin * plugin
Definition: sql_plugin_ref.h:47
command
Definition: version_token.cc:280