MySQL 8.0.39
Source Code Documentation
connection_handler_manager.cc File Reference

Functions

static void scheduler_wait_lock_begin ()
 Helper functions to allow mysys to call the thread scheduler when waiting for locks. More...
 
static void scheduler_wait_lock_end ()
 
static void scheduler_wait_sync_begin ()
 
static void scheduler_wait_sync_end ()
 
THDcreate_thd (Channel_info *channel_info)
 
void destroy_channel_info (Channel_info *channel_info)
 
void dec_connection_count ()
 
void increment_aborted_connects ()
 
int my_connection_handler_set (Connection_handler_functions *chf, THD_event_functions *tef)
 Instantiates Plugin_connection_handler based on the supplied Conection_handler_functions and sets it as the current connection handler. More...
 
int my_connection_handler_reset ()
 Destroys the current connection handler and restores the previous. More...
 

Variables

static PSI_mutex_key key_LOCK_connection_count
 
static PSI_mutex_info all_conn_manager_mutexes []
 
static PSI_cond_key key_COND_connection_count
 
static PSI_cond_info all_conn_manager_conds []
 

Function Documentation

◆ create_thd()

THD * create_thd ( Channel_info channel_info)

◆ dec_connection_count()

void dec_connection_count ( )

◆ destroy_channel_info()

void destroy_channel_info ( Channel_info channel_info)

◆ increment_aborted_connects()

void increment_aborted_connects ( )

◆ my_connection_handler_reset()

int my_connection_handler_reset ( )

Destroys the current connection handler and restores the previous.

Should only be called after calling my_connection_handler_set().

Return values
1failure
0success

◆ my_connection_handler_set()

int my_connection_handler_set ( struct Connection_handler_functions chf,
struct THD_event_functions tef 
)

Instantiates Plugin_connection_handler based on the supplied Conection_handler_functions and sets it as the current connection handler.

Also sets the THD_event_functions functions which will be called by the server when e.g. beginning a wait.

Remembers the existing connection handler so that it can be restored later.

Parameters
chfstruct with functions to be called when e.g. handling new clients.
tefstruct with functions to be called when events (e.g. lock wait) happens.
Note
Both pointers (i.e. not the structs themselves) will be copied, so the structs must not disappear.
We don't support dynamically loading more than one connection handler.
Return values
1failure
0success

◆ scheduler_wait_lock_begin()

static void scheduler_wait_lock_begin ( )
static

Helper functions to allow mysys to call the thread scheduler when waiting for locks.

◆ scheduler_wait_lock_end()

static void scheduler_wait_lock_end ( )
static

◆ scheduler_wait_sync_begin()

static void scheduler_wait_sync_begin ( )
static

◆ scheduler_wait_sync_end()

static void scheduler_wait_sync_end ( )
static

Variable Documentation

◆ all_conn_manager_conds

PSI_cond_info all_conn_manager_conds[]
static
Initial value:
= {
{&key_COND_connection_count, "COND_connection_count", PSI_FLAG_SINGLETON, 0,
#define PSI_DOCUMENT_ME
Definition: component_common.h:29
#define PSI_FLAG_SINGLETON
Singleton flag.
Definition: component_common.h:35
static PSI_cond_key key_COND_connection_count
Definition: connection_handler_manager.cc:138

◆ all_conn_manager_mutexes

PSI_mutex_info all_conn_manager_mutexes[]
static
Initial value:
= {
{&key_LOCK_connection_count, "LOCK_connection_count", PSI_FLAG_SINGLETON, 0,
static PSI_mutex_key key_LOCK_connection_count
Definition: connection_handler_manager.cc:132

◆ key_COND_connection_count

PSI_cond_key key_COND_connection_count
static

◆ key_LOCK_connection_count

PSI_mutex_key key_LOCK_connection_count
static