16 #ifndef SQL_CONNECT_INCLUDED
17 #define SQL_CONNECT_INCLUDED
20 #include "mysql_com.h"
26 void init_max_user_conn(
void);
27 void free_max_user_conn(
void);
29 pthread_handler_t handle_one_connection(
void *arg);
30 void do_handle_one_connection(THD *thd_arg);
31 bool init_new_connection_handler_thread();
32 void reset_mqh(
LEX_USER *lu,
bool get_them);
33 bool check_mqh(THD *thd, uint check_command);
34 void time_out_user_resource_limits(THD *thd,
USER_CONN *uc);
35 void decrease_user_connections(
USER_CONN *uc);
36 void release_user_connection(THD *thd);
37 bool thd_init_client_charset(THD *thd, uint cs_number);
38 bool setup_connection_thread_globals(THD *thd);
39 bool thd_prepare_connection(THD *thd);
40 bool thd_is_connection_alive(THD *thd);
42 int check_user(THD *thd,
enum enum_server_command command,
43 const char *passwd, uint passwd_len,
const char *db,
46 bool login_connection(THD *thd);
47 void prepare_new_connection_state(THD* thd);
48 void end_connection(THD *thd);
49 int get_or_create_user_conn(THD *thd,
const char *user,
51 int check_for_max_user_connections(THD *thd,
const USER_CONN *uc);