MySQL 8.3.0
Source Code Documentation
test_security_context.cc File Reference
#include <mysql/plugin.h>
#include <mysql/plugin_audit.h>
#include <mysql/service_my_plugin_log.h>
#include <mysql/service_security_context.h>
#include <stdio.h>
#include <string.h>

Functions

static MYSQL_THDVAR_STR (get_field, PLUGIN_VAR_RQCMDARG|PLUGIN_VAR_MEMALLOC, "Get specified security context field.", nullptr, nullptr, nullptr)
 
static MYSQL_THDVAR_STR (get_value, PLUGIN_VAR_RQCMDARG|PLUGIN_VAR_MEMALLOC, "Get specified security context field value.", nullptr, nullptr, nullptr)
 
static int test_security_context_notify (MYSQL_THD thd, mysql_event_class_t event_class, const void *event)
 Tests the security context service. More...
 
 mysql_declare_plugin (test_security_context)
 Plugin declaration. More...
 

Variables

static struct st_mysql_audit test_security_context_descriptor
 Plugin descriptor structure. More...
 
static SYS_VARsystem_variables []
 
 mysql_declare_plugin_end
 

Function Documentation

◆ mysql_declare_plugin()

mysql_declare_plugin ( test_security_context  )

Plugin declaration.

◆ MYSQL_THDVAR_STR() [1/2]

static MYSQL_THDVAR_STR ( get_field  ,
PLUGIN_VAR_RQCMDARG PLUGIN_VAR_MEMALLOC,
"Get specified security context field."  ,
nullptr  ,
nullptr  ,
nullptr   
)
static

◆ MYSQL_THDVAR_STR() [2/2]

static MYSQL_THDVAR_STR ( get_value  ,
PLUGIN_VAR_RQCMDARG PLUGIN_VAR_MEMALLOC,
"Get specified security context field value."  ,
nullptr  ,
nullptr  ,
nullptr   
)
static

◆ test_security_context_notify()

static int test_security_context_notify ( MYSQL_THD  thd,
mysql_event_class_t  event_class,
const void *  event 
)
static

Tests the security context service.

Do not run this in multiple concurrent threads !

Parameters
thdthe thread to work with
event_classaudit event class
eventevent data

Variable Documentation

◆ mysql_declare_plugin_end

mysql_declare_plugin_end

◆ system_variables

SYS_VAR* system_variables[]
static
Initial value:
= {
MYSQL_SYSVAR(get_field), MYSQL_SYSVAR(get_value), nullptr}
#define MYSQL_SYSVAR(name)
Definition: plugin.h:254
static Field * get_field(TABLE *table, size_t index)
Definition: table_access_service.cc:1233

◆ test_security_context_descriptor

struct st_mysql_audit test_security_context_descriptor
static
Initial value:
= {
nullptr,
{
0,
0,
0,
0,
0,
0,
0,
0,
(unsigned long)MYSQL_AUDIT_COMMAND_START,
}
}
#define MYSQL_AUDIT_INTERFACE_VERSION
Definition: plugin_audit.h:42
@ MYSQL_AUDIT_COMMAND_START
Command start event.
Definition: plugin_audit.h:426
static int test_security_context_notify(MYSQL_THD thd, mysql_event_class_t event_class, const void *event)
Tests the security context service.
Definition: test_security_context.cc:47

Plugin descriptor structure.