MySQL 8.3.0
Source Code Documentation
mysql_server_event_tracking_bridge_imp.cc File Reference

A bridge implementation that translates event tracking APIs to audit plugin APIs. More...

#include "mysql_server_event_tracking_bridge_imp.h"
#include "sql/command_mapping.h"
#include "sql/current_thd.h"
#include "sql/mysqld.h"
#include "sql/sql_audit.h"
#include "sql/sql_class.h"
#include "sql/sql_lex.h"
#include "sql/sql_plugin.h"
#include "sql/sql_rewrite.h"
#include "my_sys.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql/plugin_audit.h"
#include <memory>

Namespaces

namespace  anonymous_namespace{mysql_server_event_tracking_bridge_imp.cc}
 

Macros

#define TO_LEXCSTRING(x)    { x.str, x.length }
 Macro to perform LEX_CSTRING transformation. More...
 

Typedefs

using event_tracking_authentication_t = mysql_service_event_tracking_authentication_t
 
using event_tracking_command_t = mysql_service_event_tracking_command_t
 
using event_tracking_connection_t = mysql_service_event_tracking_connection_t
 
using event_tracking_general_t = mysql_service_event_tracking_general_t
 
using event_tracking_global_variable_t = mysql_service_event_tracking_global_variable_t
 
using event_tracking_lifecycle_t = mysql_service_event_tracking_lifecycle_t
 
using event_tracking_message_t = mysql_service_event_tracking_message_t
 
using event_tracking_parse_t = mysql_service_event_tracking_parse_t
 
using event_tracking_query_t = mysql_service_event_tracking_query_t
 
using event_tracking_stored_program_t = mysql_service_event_tracking_stored_program_t
 
using event_tracking_table_access_t = mysql_service_event_tracking_table_access_t
 

Functions

void init_srv_event_tracking_handles ()
 
void deinit_srv_event_tracking_handles ()
 
static bool anonymous_namespace{mysql_server_event_tracking_bridge_imp.cc}::check_audit_mask (const unsigned long lhs, const unsigned long rhs)
 Check, whether masks specified by lhs parameter and rhs parameters overlap. More...
 
static int anonymous_namespace{mysql_server_event_tracking_bridge_imp.cc}::plugins_dispatch (THD *thd, plugin_ref plugin, void *arg)
 Dispatches an event by invoking the plugin's event_notify method. More...
 
static bool anonymous_namespace{mysql_server_event_tracking_bridge_imp.cc}::plugins_dispatch_bool (THD *thd, plugin_ref plugin, void *arg)
 
int anonymous_namespace{mysql_server_event_tracking_bridge_imp.cc}::event_class_dispatch (THD *thd, mysql_event_class_t event_class, const void *event)
 Distributes an audit event to plug-ins. More...
 
static const CHARSET_INFOanonymous_namespace{mysql_server_event_tracking_bridge_imp.cc}::get_charset_from_thd (THD *thd)
 
const CHARSET_INFOanonymous_namespace{mysql_server_event_tracking_bridge_imp.cc}::thd_get_audit_query (THD *thd, LEX_CSTRING *query)
 Fill query info extracted from the thread object and return the thread object charset info. More...
 

Variables

const mysql_service_event_tracking_authentication_tsrv_event_tracking_authentication
 
const mysql_service_event_tracking_command_tsrv_event_tracking_command = nullptr
 
const mysql_service_event_tracking_connection_tsrv_event_tracking_connection
 
const mysql_service_event_tracking_general_tsrv_event_tracking_general = nullptr
 
const mysql_service_event_tracking_global_variable_tsrv_event_tracking_global_variable = nullptr
 
const mysql_service_event_tracking_lifecycle_tsrv_event_tracking_lifecycle = nullptr
 
const mysql_service_event_tracking_message_tsrv_event_tracking_message = nullptr
 
const mysql_service_event_tracking_parse_tsrv_event_tracking_parse = nullptr
 
const mysql_service_event_tracking_query_tsrv_event_tracking_query = nullptr
 
const mysql_service_event_tracking_stored_program_tsrv_event_tracking_stored_program
 
const mysql_service_event_tracking_table_access_tsrv_event_tracking_table_access
 
static bool inited = false
 

Detailed Description

A bridge implementation that translates event tracking APIs to audit plugin APIs.

Macro Definition Documentation

◆ TO_LEXCSTRING

#define TO_LEXCSTRING (   x)     { x.str, x.length }

Macro to perform LEX_CSTRING transformation.

Typedef Documentation

◆ event_tracking_authentication_t

◆ event_tracking_command_t

◆ event_tracking_connection_t

◆ event_tracking_general_t

◆ event_tracking_global_variable_t

◆ event_tracking_lifecycle_t

◆ event_tracking_message_t

◆ event_tracking_parse_t

◆ event_tracking_query_t

◆ event_tracking_stored_program_t

◆ event_tracking_table_access_t

Function Documentation

◆ deinit_srv_event_tracking_handles()

void deinit_srv_event_tracking_handles ( )

◆ init_srv_event_tracking_handles()

void init_srv_event_tracking_handles ( )

Variable Documentation

◆ inited

bool inited = false
static

◆ srv_event_tracking_authentication

const mysql_service_event_tracking_authentication_t* srv_event_tracking_authentication
Initial value:
=
nullptr

◆ srv_event_tracking_command

const mysql_service_event_tracking_command_t* srv_event_tracking_command = nullptr

◆ srv_event_tracking_connection

const mysql_service_event_tracking_connection_t* srv_event_tracking_connection
Initial value:
=
nullptr

◆ srv_event_tracking_general

const mysql_service_event_tracking_general_t* srv_event_tracking_general = nullptr

◆ srv_event_tracking_global_variable

const mysql_service_event_tracking_global_variable_t* srv_event_tracking_global_variable = nullptr

◆ srv_event_tracking_lifecycle

const mysql_service_event_tracking_lifecycle_t* srv_event_tracking_lifecycle = nullptr

◆ srv_event_tracking_message

const mysql_service_event_tracking_message_t* srv_event_tracking_message = nullptr

◆ srv_event_tracking_parse

const mysql_service_event_tracking_parse_t* srv_event_tracking_parse = nullptr

◆ srv_event_tracking_query

const mysql_service_event_tracking_query_t* srv_event_tracking_query = nullptr

◆ srv_event_tracking_stored_program

const mysql_service_event_tracking_stored_program_t* srv_event_tracking_stored_program
Initial value:
=
nullptr

◆ srv_event_tracking_table_access

const mysql_service_event_tracking_table_access_t* srv_event_tracking_table_access
Initial value:
=
nullptr