#include <stddef.h>
#include <sys/types.h>
#include "my_inttypes.h"
 
Go to the source code of this file.
 | 
| void  | init_max_user_conn (void) | 
|   | 
| void  | free_max_user_conn (void) | 
|   | 
| void  | reset_mqh (THD *thd, LEX_USER *lu, bool get_them) | 
|   | 
| bool  | check_mqh (THD *thd, uint check_command) | 
|   | 
| void  | decrease_user_connections (USER_CONN *uc) | 
|   | 
| void  | release_user_connection (THD *thd) | 
|   | 
| bool  | thd_init_client_charset (THD *thd, uint cs_number) | 
|   | Set thread character set variables from the given ID.  More...
  | 
|   | 
| bool  | thd_prepare_connection (THD *thd) | 
|   | 
| void  | close_connection (THD *thd, uint sql_errno=0, bool server_shutdown=false, bool generate_event=true) | 
|   | Close a connection.  More...
  | 
|   | 
| bool  | thd_connection_alive (THD *thd) | 
|   | 
| void  | end_connection (THD *thd) | 
|   | 
| int  | get_or_create_user_conn (THD *thd, const char *user, const char *host, const USER_RESOURCES *mqh) | 
|   | 
| int  | check_for_max_user_connections (THD *thd, const USER_CONN *uc) | 
|   | 
◆ USER_CONN
◆ USER_RESOURCES
◆ check_for_max_user_connections()
      
        
          | int check_for_max_user_connections  | 
          ( | 
          THD *  | 
          thd,  | 
        
        
           | 
           | 
          const USER_CONN *  | 
          uc  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ check_mqh()
      
        
          | bool check_mqh  | 
          ( | 
          THD *  | 
          thd,  | 
        
        
           | 
           | 
          uint  | 
          check_command  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ close_connection()
      
        
          | void close_connection  | 
          ( | 
          THD *  | 
          thd,  | 
        
        
           | 
           | 
          uint  | 
          sql_errno,  | 
        
        
           | 
           | 
          bool  | 
          server_shutdown,  | 
        
        
           | 
           | 
          bool  | 
          generate_event  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Close a connection. 
- Parameters
 - 
  
    | thd | Thread handle.  | 
    | sql_errno | The error code to send before disconnect.  | 
    | server_shutdown | True for a server shutdown  | 
    | generate_event | Generate Audit API disconnect event. | 
  
   
- Note
 - For the connection that is doing shutdown, this is called twice 
 
 
 
◆ decrease_user_connections()
      
        
          | void decrease_user_connections  | 
          ( | 
          USER_CONN *  | 
          uc | ) | 
           | 
        
      
 
 
◆ end_connection()
      
        
          | void end_connection  | 
          ( | 
          THD *  | 
          thd | ) | 
           | 
        
      
 
 
◆ free_max_user_conn()
      
        
          | void free_max_user_conn  | 
          ( | 
          void  | 
           | ) | 
           | 
        
      
 
 
◆ get_or_create_user_conn()
      
        
          | int get_or_create_user_conn  | 
          ( | 
          THD *  | 
          thd,  | 
        
        
           | 
           | 
          const char *  | 
          user,  | 
        
        
           | 
           | 
          const char *  | 
          host,  | 
        
        
           | 
           | 
          const USER_RESOURCES *  | 
          mqh  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ init_max_user_conn()
      
        
          | void init_max_user_conn  | 
          ( | 
          void  | 
           | ) | 
           | 
        
      
 
 
◆ release_user_connection()
      
        
          | void release_user_connection  | 
          ( | 
          THD *  | 
          thd | ) | 
           | 
        
      
 
 
◆ reset_mqh()
      
        
          | void reset_mqh  | 
          ( | 
          THD *  | 
          thd,  | 
        
        
           | 
           | 
          LEX_USER *  | 
          lu,  | 
        
        
           | 
           | 
          bool  | 
          get_them  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ thd_connection_alive()
      
        
          | bool thd_connection_alive  | 
          ( | 
          THD *  | 
          thd | ) | 
           | 
        
      
 
 
◆ thd_init_client_charset()
      
        
          | bool thd_init_client_charset  | 
          ( | 
          THD *  | 
          thd,  | 
        
        
           | 
           | 
          uint  | 
          cs_number  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Set thread character set variables from the given ID. 
- Parameters
 - 
  
    | thd | thread handle  | 
    | cs_number | character set and collation ID | 
  
   
- Return values
 - 
  
    | 0 | OK; character_set_client, collation_connection and character_set_results are set to the new value, or to the default global values. | 
    | 1 | error, e.g. the given ID is not supported by parser. Corresponding SQL error is sent.  | 
  
   
 
 
◆ thd_prepare_connection()
      
        
          | bool thd_prepare_connection  | 
          ( | 
          THD *  | 
          thd | ) | 
           |