24#ifndef SQL_CONNECT_INCLUDED
25#define SQL_CONNECT_INCLUDED
106 bool server_shutdown =
false,
bool generate_event =
true);
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
char * user
Definition: mysqladmin.cc:66
const char * host
Definition: mysqladmin.cc:65
bool thd_prepare_connection(THD *thd)
Definition: sql_connect.cc:893
void init_max_user_conn(void)
Definition: sql_connect.cc:331
void decrease_user_connections(USER_CONN *uc)
Definition: sql_connect.cc:252
void close_connection(THD *thd, uint sql_errno=0, bool server_shutdown=false, bool generate_event=true)
Close a connection.
Definition: sql_connect.cc:918
int get_or_create_user_conn(THD *thd, const char *user, const char *host, const USER_RESOURCES *mqh)
Definition: sql_connect.cc:123
void reset_mqh(THD *thd, LEX_USER *lu, bool get_them)
Definition: sql_connect.cc:342
bool thd_connection_alive(THD *thd)
Definition: sql_connect.cc:936
void end_connection(THD *thd)
Definition: sql_connect.cc:733
void release_user_connection(THD *thd)
Definition: sql_connect.cc:271
bool thd_init_client_charset(THD *thd, uint cs_number)
Set thread character set variables from the given ID.
Definition: sql_connect.cc:390
int check_for_max_user_connections(THD *thd, const USER_CONN *uc)
Definition: sql_connect.cc:182
struct user_resources USER_RESOURCES
struct user_conn USER_CONN
void free_max_user_conn(void)
Definition: sql_connect.cc:337
bool check_mqh(THD *thd, uint check_command)
Definition: sql_connect.cc:293
Definition: sql_connect.h:70
uint updates
Definition: sql_connect.h:92
char * user
Definition: sql_connect.h:76
char * host
Definition: sql_connect.h:78
uint conn_per_hour
Definition: sql_connect.h:92
USER_RESOURCES user_resources
Definition: sql_connect.h:94
ulonglong reset_utime
The moment of time when per hour counters were reset last time (i.e.
Definition: sql_connect.h:83
uint connections
Definition: sql_connect.h:87
uint questions
Definition: sql_connect.h:92
size_t len
Definition: sql_connect.h:85
Definition: sql_connect.h:41
@ USER_CONNECTIONS
Definition: sql_connect.h:61
@ UPDATES_PER_HOUR
Definition: sql_connect.h:59
@ CONNECTIONS_PER_HOUR
Definition: sql_connect.h:60
@ QUERIES_PER_HOUR
Definition: sql_connect.h:58
uint conn_per_hour
Definition: sql_connect.h:50
uint user_conn
Definition: sql_connect.h:52
uint updates
Definition: sql_connect.h:48
uint questions
Definition: sql_connect.h:43
uint specified_limits
Definition: sql_connect.h:63