My Project
sql_connect.h
00001 /* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
00002 
00003    This program is free software; you can redistribute it and/or modify
00004    it under the terms of the GNU General Public License as published by
00005    the Free Software Foundation; version 2 of the License.
00006 
00007    This program is distributed in the hope that it will be useful,
00008    but WITHOUT ANY WARRANTY; without even the implied warranty of
00009    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010    GNU General Public License for more details.
00011 
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software
00014    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00015 
00016 #ifndef SQL_CONNECT_INCLUDED
00017 #define SQL_CONNECT_INCLUDED
00018 
00019 #include "my_sys.h"                          /* pthread_handler_t */
00020 #include "mysql_com.h"                         /* enum_server_command */
00021 
00022 class THD;
00023 typedef struct st_lex_user LEX_USER;
00024 typedef struct user_conn USER_CONN;
00025 
00026 void init_max_user_conn(void);
00027 void free_max_user_conn(void);
00028 
00029 pthread_handler_t handle_one_connection(void *arg);
00030 void do_handle_one_connection(THD *thd_arg);
00031 bool init_new_connection_handler_thread();
00032 void reset_mqh(LEX_USER *lu, bool get_them);
00033 bool check_mqh(THD *thd, uint check_command);
00034 void time_out_user_resource_limits(THD *thd, USER_CONN *uc);
00035 void decrease_user_connections(USER_CONN *uc);
00036 void release_user_connection(THD *thd);
00037 bool thd_init_client_charset(THD *thd, uint cs_number);
00038 bool setup_connection_thread_globals(THD *thd);
00039 bool thd_prepare_connection(THD *thd);
00040 bool thd_is_connection_alive(THD *thd);
00041 
00042 int check_user(THD *thd, enum enum_server_command command,
00043                const char *passwd, uint passwd_len, const char *db,
00044                bool check_count);
00045 
00046 bool login_connection(THD *thd);
00047 void prepare_new_connection_state(THD* thd);
00048 void end_connection(THD *thd);
00049 int get_or_create_user_conn(THD *thd, const char *user,
00050                             const char *host, const USER_RESOURCES *mqh);
00051 int check_for_max_user_connections(THD *thd, const USER_CONN *uc);
00052 
00053 #endif /* SQL_CONNECT_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines