26#ifndef CONNECTION_HANDLER_MANAGER_INCLUDED
27#define CONNECTION_HANDLER_MANAGER_INCLUDED
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
This abstract base class represents connection channel information about a new connection.
Definition: channel_info.h:47
This is a singleton class that provides various connection management related functionalities,...
Definition: connection_handler_manager.h:58
static uint connection_count
Definition: connection_handler_manager.h:117
Connection_handler_manager(const Connection_handler_manager &)
static mysql_mutex_t LOCK_connection_count
Definition: connection_handler_manager.h:62
ulong m_saved_thread_handling
Definition: connection_handler_manager.h:70
void inc_aborted_connects()
Definition: connection_handler_manager.h:196
static uint max_threads
Maximum number of threads that can be created by the current connection handler.
Definition: connection_handler_manager.h:133
static void dec_connection_count()
Decrease the number of current connections.
Definition: connection_handler_manager.h:186
bool valid_connection_count()
Check if the current number of connections are below or equal the value given by the max_connections ...
Definition: connection_handler_manager.cc:93
void load_connection_handler(Connection_handler *conn_handler)
Dynamically load a connection handler implemented as a plugin.
Definition: connection_handler_manager.cc:231
static THD_event_functions * saved_event_functions
Definition: connection_handler_manager.h:127
static ulong thread_handling
Definition: connection_handler_manager.h:122
static bool init()
Initialize the connection handler manager.
Definition: connection_handler_manager.cc:145
static void destroy_instance()
Destroy the singleton instance.
Definition: connection_handler_manager.cc:213
static mysql_cond_t COND_connection_count
Definition: connection_handler_manager.h:63
bool check_and_incr_conn_count(bool ignore_max_connection_count)
Increment connection count if max_connections is not exceeded.
Definition: connection_handler_manager.cc:104
void process_new_connection(Channel_info *channel_info)
Process a new incoming connection.
Definition: connection_handler_manager.cc:254
static Connection_handler_manager * m_instance
Definition: connection_handler_manager.h:60
Connection_handler_manager(Connection_handler *connection_handler)
Constructor to instantiate an instance of this class.
Definition: connection_handler_manager.h:80
~Connection_handler_manager()
Definition: connection_handler_manager.h:87
ulong m_aborted_connects
Definition: connection_handler_manager.h:73
static Connection_handler_manager * get_instance()
Singleton method to return an instance of this class.
Definition: connection_handler_manager.h:138
static void wait_till_no_connection()
Waits until all connections are done with their job.
Definition: connection_handler_manager.cc:204
Connection_handler_manager & operator=(const Connection_handler_manager &)
static THD_event_functions * event_functions
Definition: connection_handler_manager.h:125
static ulong max_used_connections
Definition: connection_handler_manager.h:118
ulong m_connection_errors_max_connection
Definition: connection_handler_manager.h:75
bool unload_connection_handler()
Unload the connection handler previously loaded by load_connection_handler().
Definition: connection_handler_manager.cc:242
ulong connection_errors_max_connection() const
Definition: connection_handler_manager.h:203
static ulong max_used_connections_time
Definition: connection_handler_manager.h:119
static uint get_connection_count()
Return number of connections in thread-safe way.
Definition: connection_handler_manager.h:240
scheduler_types
thread_handling enumeration.
Definition: connection_handler_manager.h:110
@ SCHEDULER_TYPES_COUNT
Definition: connection_handler_manager.h:113
@ SCHEDULER_NO_THREADS
Definition: connection_handler_manager.h:112
@ SCHEDULER_ONE_THREAD_PER_CONNECTION
Definition: connection_handler_manager.h:111
static void reset_max_used_connections()
Reset the max_used_connections counter to the number of current connections.
Definition: connection_handler_manager.cc:224
ulong aborted_connects() const
Definition: connection_handler_manager.h:198
Connection_handler * m_connection_handler
Definition: connection_handler_manager.h:66
Connection_handler * m_saved_connection_handler
Definition: connection_handler_manager.h:68
This abstract base class represents how connections are processed, most importantly how they map to O...
Definition: connection_handler.h:37
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
#define mysql_cond_signal(C)
Definition: mysql_cond.h:56
#define mysql_mutex_lock(M)
Definition: mysql_mutex.h:50
#define mysql_mutex_unlock(M)
Definition: mysql_mutex.h:57
wait_type
Definition: socket_constants.h:86
Instrumentation helpers for conditions.
Instrumentation helpers for mutexes.
Functions to notify interested connection handlers of events like beginning of wait and end of wait a...
Definition: connection_handler_manager.h:47
void(* post_kill_notification)(THD *thd)
Definition: connection_handler_manager.h:50
void(* thd_wait_end)(THD *thd)
Definition: connection_handler_manager.h:49
void(* thd_wait_begin)(THD *thd, int wait_type)
Definition: connection_handler_manager.h:48
An instrumented cond structure.
Definition: mysql_cond_bits.h:50
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50