25#ifndef CONNECTION_HANDLER_MANAGER_INCLUDED
26#define CONNECTION_HANDLER_MANAGER_INCLUDED
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:250
This abstract base class represents connection channel information about a new connection.
Definition: channel_info.h:46
This is a singleton class that provides various connection management related functionalities,...
Definition: connection_handler_manager.h:57
static uint connection_count
Definition: connection_handler_manager.h:116
Connection_handler_manager(const Connection_handler_manager &)
static mysql_mutex_t LOCK_connection_count
Definition: connection_handler_manager.h:61
ulong m_saved_thread_handling
Definition: connection_handler_manager.h:69
void inc_aborted_connects()
Definition: connection_handler_manager.h:195
static uint max_threads
Maximum number of threads that can be created by the current connection handler.
Definition: connection_handler_manager.h:132
static void dec_connection_count()
Decrease the number of current connections.
Definition: connection_handler_manager.h:185
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:91
void load_connection_handler(Connection_handler *conn_handler)
Dynamically load a connection handler implemented as a plugin.
Definition: connection_handler_manager.cc:228
static THD_event_functions * saved_event_functions
Definition: connection_handler_manager.h:126
static ulong thread_handling
Definition: connection_handler_manager.h:121
static bool init()
Initialize the connection handler manager.
Definition: connection_handler_manager.cc:143
static void destroy_instance()
Destroy the singleton instance.
Definition: connection_handler_manager.cc:210
static mysql_cond_t COND_connection_count
Definition: connection_handler_manager.h:62
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:102
void process_new_connection(Channel_info *channel_info)
Process a new incoming connection.
Definition: connection_handler_manager.cc:251
static Connection_handler_manager * m_instance
Definition: connection_handler_manager.h:59
Connection_handler_manager(Connection_handler *connection_handler)
Constructor to instantiate an instance of this class.
Definition: connection_handler_manager.h:79
~Connection_handler_manager()
Definition: connection_handler_manager.h:86
ulong m_aborted_connects
Definition: connection_handler_manager.h:72
static Connection_handler_manager * get_instance()
Singleton method to return an instance of this class.
Definition: connection_handler_manager.h:137
static void wait_till_no_connection()
Waits until all connections are done with their job.
Definition: connection_handler_manager.cc:202
Connection_handler_manager & operator=(const Connection_handler_manager &)
static THD_event_functions * event_functions
Definition: connection_handler_manager.h:124
static ulong max_used_connections
Definition: connection_handler_manager.h:117
ulong m_connection_errors_max_connection
Definition: connection_handler_manager.h:74
bool unload_connection_handler()
Unload the connection handler previously loaded by load_connection_handler().
Definition: connection_handler_manager.cc:239
ulong connection_errors_max_connection() const
Definition: connection_handler_manager.h:202
static ulong max_used_connections_time
Definition: connection_handler_manager.h:118
static uint get_connection_count()
Return number of connections in thread-safe way.
Definition: connection_handler_manager.h:239
scheduler_types
thread_handling enumeration.
Definition: connection_handler_manager.h:109
@ SCHEDULER_TYPES_COUNT
Definition: connection_handler_manager.h:112
@ SCHEDULER_NO_THREADS
Definition: connection_handler_manager.h:111
@ SCHEDULER_ONE_THREAD_PER_CONNECTION
Definition: connection_handler_manager.h:110
static void reset_max_used_connections()
Reset the max_used_connections counter to the number of current connections.
Definition: connection_handler_manager.cc:221
ulong aborted_connects() const
Definition: connection_handler_manager.h:197
Connection_handler * m_connection_handler
Definition: connection_handler_manager.h:65
Connection_handler * m_saved_connection_handler
Definition: connection_handler_manager.h:67
This abstract base class represents how connections are processed, most importantly how they map to O...
Definition: connection_handler.h:36
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:35
#define mysql_cond_signal(C)
Definition: mysql_cond.h:55
#define mysql_mutex_lock(M)
Definition: mysql_mutex.h:49
#define mysql_mutex_unlock(M)
Definition: mysql_mutex.h:56
wait_type
Definition: socket_constants.h:85
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:46
void(* post_kill_notification)(THD *thd)
Definition: connection_handler_manager.h:49
void(* thd_wait_end)(THD *thd)
Definition: connection_handler_manager.h:48
void(* thd_wait_begin)(THD *thd, int wait_type)
Definition: connection_handler_manager.h:47
An instrumented cond structure.
Definition: mysql_cond_bits.h:49
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:49