MySQL  8.0.27
Source Code Documentation
connection_handler_per_thread.cc File Reference

Functions

static THDinit_new_thd (Channel_info *channel_info)
 Construct and initialize a THD object for a new connection. More...
 
static void * handle_connection (void *arg)
 Thread handler for a connection. More...
 

Variables

static Error_log_throttle create_thd_err_log_throttle (Log_throttle ::LOG_THROTTLE_WINDOW_SIZE, ERROR_LEVEL, 0, "connection_handler", "Error log throttle: %10lu" " 'Can't create thread to" " handle new connection'" " error(s) suppressed")
 
static uint wake_pthread = 0
 
static PSI_mutex_key key_LOCK_thread_cache
 
static PSI_mutex_info all_per_thread_mutexes []
 
static PSI_cond_key key_COND_thread_cache
 
static PSI_cond_key key_COND_flush_thread_cache
 
static PSI_cond_info all_per_thread_conds []
 

Function Documentation

◆ handle_connection()

static void* handle_connection ( void *  arg)
static

Thread handler for a connection.

Parameters
argConnection object (Channel_info)

This function (normally) does the following:

  • Initialize thread
  • Initialize THD to be used with this thread
  • Authenticate user
  • Execute all queries sent on the connection
  • Take connection down
  • End thread / Handle next connection using thread from thread cache

◆ init_new_thd()

static THD* init_new_thd ( Channel_info channel_info)
static

Construct and initialize a THD object for a new connection.

Parameters
channel_infoChannel_info object representing the new connection. Will be destroyed by this function.
Return values
NULLInitialization failed.
!NULLPointer to new THD object for the new connection.

Variable Documentation

◆ all_per_thread_conds

PSI_cond_info all_per_thread_conds[]
static
Initial value:
= {
{&key_COND_thread_cache, "COND_thread_cache", PSI_FLAG_SINGLETON, 0,
{&key_COND_flush_thread_cache, "COND_flush_thread_cache",
#define PSI_DOCUMENT_ME
Definition: component_common.h:28
#define PSI_FLAG_SINGLETON
Singleton flag.
Definition: component_common.h:34
static PSI_cond_key key_COND_flush_thread_cache
Definition: connection_handler_per_thread.cc:99
static PSI_cond_key key_COND_thread_cache
Definition: connection_handler_per_thread.cc:98

◆ all_per_thread_mutexes

PSI_mutex_info all_per_thread_mutexes[]
static
Initial value:
= {
{&key_LOCK_thread_cache, "LOCK_thread_cache", PSI_FLAG_SINGLETON, 0,
static PSI_mutex_key key_LOCK_thread_cache
Definition: connection_handler_per_thread.cc:92

◆ create_thd_err_log_throttle

Error_log_throttle create_thd_err_log_throttle(Log_throttle ::LOG_THROTTLE_WINDOW_SIZE, ERROR_LEVEL, 0, "connection_handler", "Error log throttle: %10lu" " 'Can't create thread to" " handle new connection'" " error(s) suppressed") ( Log_throttle ::LOG_THROTTLE_WINDOW_SIZE  ,
ERROR_LEVEL  ,
,
"connection_handler"  ,
"Error log throttle: %10lu" " 'Can't create thread to" " handle new connection'" " error(s) suppressed"   
)
static

◆ key_COND_flush_thread_cache

PSI_cond_key key_COND_flush_thread_cache
static

◆ key_COND_thread_cache

PSI_cond_key key_COND_thread_cache
static

◆ key_LOCK_thread_cache

PSI_mutex_key key_LOCK_thread_cache
static

◆ wake_pthread

uint wake_pthread = 0
static