26#ifndef CONNECTION_HANDLER_MANAGER_INCLUDED
27#define CONNECTION_HANDLER_MANAGER_INCLUDED
123 static std::atomic_ulong
185 bool internal_session);
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:59
static uint connection_count
Definition: connection_handler_manager.h:118
Connection_handler_manager(const Connection_handler_manager &)
static mysql_mutex_t LOCK_connection_count
Definition: connection_handler_manager.h:63
ulong m_saved_thread_handling
Definition: connection_handler_manager.h:71
static ulong get_incoming_connects()
Definition: connection_handler_manager.h:206
void inc_aborted_connects()
Definition: connection_handler_manager.h:210
static uint max_threads
Maximum number of threads that can be created by the current connection handler.
Definition: connection_handler_manager.h:138
static void dec_connection_count()
Decrease the number of current connections.
Definition: connection_handler_manager.h:196
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:95
void load_connection_handler(Connection_handler *conn_handler)
Dynamically load a connection handler implemented as a plugin.
Definition: connection_handler_manager.cc:233
static THD_event_functions * saved_event_functions
Definition: connection_handler_manager.h:132
static ulong thread_handling
Definition: connection_handler_manager.h:127
static std::atomic_ulong incoming_connection_count
Definition: connection_handler_manager.h:124
static bool init()
Initialize the connection handler manager.
Definition: connection_handler_manager.cc:147
static void destroy_instance()
Destroy the singleton instance.
Definition: connection_handler_manager.cc:215
static mysql_cond_t COND_connection_count
Definition: connection_handler_manager.h:64
void process_new_connection(Channel_info *channel_info)
Process a new incoming connection.
Definition: connection_handler_manager.cc:256
static Connection_handler_manager * m_instance
Definition: connection_handler_manager.h:61
Connection_handler_manager(Connection_handler *connection_handler)
Constructor to instantiate an instance of this class.
Definition: connection_handler_manager.h:81
~Connection_handler_manager()
Definition: connection_handler_manager.h:88
ulong m_aborted_connects
Definition: connection_handler_manager.h:74
static Connection_handler_manager * get_instance()
Singleton method to return an instance of this class.
Definition: connection_handler_manager.h:143
static void wait_till_no_connection()
Waits until all connections are done with their job.
Definition: connection_handler_manager.cc:206
Connection_handler_manager & operator=(const Connection_handler_manager &)
static THD_event_functions * event_functions
Definition: connection_handler_manager.h:130
static ulong max_used_connections
Definition: connection_handler_manager.h:119
bool check_and_incr_conn_count(bool ignore_max_connection_count, bool internal_session)
Increment connection count if max_connections is not exceeded.
Definition: connection_handler_manager.cc:106
ulong m_connection_errors_max_connection
Definition: connection_handler_manager.h:76
bool unload_connection_handler()
Unload the connection handler previously loaded by load_connection_handler().
Definition: connection_handler_manager.cc:244
ulong connection_errors_max_connection() const
Definition: connection_handler_manager.h:217
static ulong max_used_connections_time
Definition: connection_handler_manager.h:120
static uint get_connection_count()
Return number of connections in thread-safe way.
Definition: connection_handler_manager.h:254
scheduler_types
thread_handling enumeration.
Definition: connection_handler_manager.h:111
@ SCHEDULER_TYPES_COUNT
Definition: connection_handler_manager.h:114
@ SCHEDULER_NO_THREADS
Definition: connection_handler_manager.h:113
@ SCHEDULER_ONE_THREAD_PER_CONNECTION
Definition: connection_handler_manager.h:112
static void reset_max_used_connections()
Reset the max_used_connections counter to the number of current connections.
Definition: connection_handler_manager.cc:226
ulong aborted_connects() const
Definition: connection_handler_manager.h:212
Connection_handler * m_connection_handler
Definition: connection_handler_manager.h:67
Connection_handler * m_saved_connection_handler
Definition: connection_handler_manager.h:69
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:48
void(* post_kill_notification)(THD *thd)
Definition: connection_handler_manager.h:51
void(* thd_wait_end)(THD *thd)
Definition: connection_handler_manager.h:50
void(* thd_wait_begin)(THD *thd, int wait_type)
Definition: connection_handler_manager.h:49
An instrumented cond structure.
Definition: mysql_cond_bits.h:50
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50