MySQL 9.0.0
Source Code Documentation
|
#include "sql/sql_connect.h"
#include "my_config.h"
#include "my_psi_config.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql/components/services/log_shared.h"
#include "mysql/my_loglevel.h"
#include "pfs_thread_provider.h"
#include "sql/table.h"
#include <netdb.h>
#include <netinet/in.h>
#include <stdint.h>
#include <string.h>
#include <sys/socket.h>
#include <algorithm>
#include <atomic>
#include <memory>
#include <string>
#include <unordered_map>
#include <utility>
#include "lex_string.h"
#include "m_string.h"
#include "map_helpers.h"
#include "my_command.h"
#include "my_dbug.h"
#include "my_sqlcommand.h"
#include "my_sys.h"
#include "mysql/plugin_audit.h"
#include "mysql/psi/mysql_mutex.h"
#include "mysql/psi/mysql_thread.h"
#include "mysql/service_mysql_alloc.h"
#include "mysql/strings/m_ctype.h"
#include "mysql_com.h"
#include "mysqld_error.h"
#include "sql-common/net_ns.h"
#include "sql/auth/auth_acls.h"
#include "sql/auth/auth_common.h"
#include "sql/auth/sql_security_ctx.h"
#include "sql/debug_sync.h"
#include "sql/derror.h"
#include "sql/hostname_cache.h"
#include "sql/item_func.h"
#include "sql/log.h"
#include "sql/mysqld.h"
#include "sql/protocol.h"
#include "sql/protocol_classic.h"
#include "sql/psi_memory_key.h"
#include "sql/sql_audit.h"
#include "sql/sql_class.h"
#include "sql/sql_error.h"
#include "sql/sql_lex.h"
#include "sql/sql_parse.h"
#include "sql/sql_plugin.h"
#include "sql/system_variables.h"
#include "sql_string.h"
#include "string_with_len.h"
#include "violite.h"
#include <arpa/inet.h>
Macros | |
#define | SSL_HANDSHAKE_SIZE 2 |
#define | NORMAL_HANDSHAKE_SIZE 6 |
#define | MIN_HANDSHAKE_SIZE 2 |
Functions | |
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) |
void | decrease_user_connections (USER_CONN *uc) |
void | release_user_connection (THD *thd) |
bool | check_mqh (THD *thd, uint check_command) |
void | init_max_user_conn (void) |
void | free_max_user_conn (void) |
void | reset_mqh (THD *thd, LEX_USER *lu, bool get_them=false) |
bool | thd_init_client_charset (THD *thd, uint cs_number) |
Set thread character set variables from the given ID. More... | |
static int | check_connection (THD *thd) |
static bool | login_connection (THD *thd) |
void | end_connection (THD *thd) |
static void | prepare_new_connection_state (THD *thd) |
bool | thd_prepare_connection (THD *thd) |
void | close_connection (THD *thd, uint sql_errno, bool server_shutdown, bool generate_event) |
Close a connection. More... | |
bool | thd_connection_alive (THD *thd) |
Variables | |
static collation_unordered_map< std::string, unique_ptr_my_free< user_conn > > * | hash_user_connections |
#define MIN_HANDSHAKE_SIZE 2 |
#define NORMAL_HANDSHAKE_SIZE 6 |
#define SSL_HANDSHAKE_SIZE 2 |
|
static |
bool check_mqh | ( | THD * | thd, |
uint | check_command | ||
) |
void close_connection | ( | THD * | thd, |
uint | sql_errno, | ||
bool | server_shutdown, | ||
bool | generate_event | ||
) |
Close a connection.
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. |
void decrease_user_connections | ( | USER_CONN * | uc | ) |
void end_connection | ( | THD * | thd | ) |
void free_max_user_conn | ( | void | ) |
int get_or_create_user_conn | ( | THD * | thd, |
const char * | user, | ||
const char * | host, | ||
const USER_RESOURCES * | mqh | ||
) |
void init_max_user_conn | ( | void | ) |
|
static |
|
static |
void release_user_connection | ( | THD * | thd | ) |
bool thd_connection_alive | ( | THD * | thd | ) |
bool thd_init_client_charset | ( | THD * | thd, |
uint | cs_number | ||
) |
Set thread character set variables from the given ID.
thd | thread handle |
cs_number | character set and collation ID |
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. |
bool thd_prepare_connection | ( | THD * | thd | ) |
|
static |