MySQL 8.4.3
Source Code Documentation
sql_connect.h File Reference
#include <stddef.h>
#include <sys/types.h>
#include "my_inttypes.h"

Go to the source code of this file.

Classes

struct  user_resources
 
struct  user_conn
 

Typedefs

typedef struct user_resources USER_RESOURCES
 
typedef struct user_conn USER_CONN
 

Functions

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)
 

Typedef Documentation

◆ USER_CONN

typedef struct user_conn USER_CONN

◆ USER_RESOURCES

Function Documentation

◆ 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
thdThread handle.
sql_errnoThe error code to send before disconnect.
server_shutdownTrue for a server shutdown
generate_eventGenerate 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
thdthread handle
cs_numbercharacter set and collation ID
Return values
0OK; character_set_client, collation_connection and character_set_results are set to the new value, or to the default global values.
1error, e.g. the given ID is not supported by parser. Corresponding SQL error is sent.

◆ thd_prepare_connection()

bool thd_prepare_connection ( THD thd)