MySQL 8.4.2
Source Code Documentation
|
#include "my_config.h"
#include <signal.h>
#include <stdint.h>
#include <sys/types.h>
#include <time.h>
#include <atomic>
#include <string>
#include <vector>
#include <mysql/components/minimal_chassis.h>
#include <mysql/components/services/dynamic_loader_scheme_file.h>
#include "lex_string.h"
#include "my_command.h"
#include "my_compress.h"
#include "my_getopt.h"
#include "my_hostname.h"
#include "my_inttypes.h"
#include "my_io.h"
#include "my_psi_config.h"
#include "my_sharedlib.h"
#include "my_sqlcommand.h"
#include "my_sys.h"
#include "my_thread.h"
#include "mysql/components/services/bits/mysql_cond_bits.h"
#include "mysql/components/services/bits/mysql_mutex_bits.h"
#include "mysql/components/services/bits/mysql_rwlock_bits.h"
#include "mysql/components/services/bits/psi_cond_bits.h"
#include "mysql/components/services/bits/psi_file_bits.h"
#include "mysql/components/services/bits/psi_mutex_bits.h"
#include "mysql/components/services/bits/psi_rwlock_bits.h"
#include "mysql/components/services/bits/psi_socket_bits.h"
#include "mysql/components/services/bits/psi_stage_bits.h"
#include "mysql/components/services/bits/psi_statement_bits.h"
#include "mysql/components/services/bits/psi_thread_bits.h"
#include "mysql/status_var.h"
#include "mysql/strings/m_ctype.h"
#include "mysql_com.h"
#include "aggregated_stats.h"
#include "sql/sql_bitmap.h"
#include "sql/sql_const.h"
Go to the source code of this file.
Macros | |
#define | TEST_PRINT_CACHED_TABLES 1 |
#define | TEST_NO_KEY_GROUP 2 |
#define | TEST_MIT_THREAD 4 |
#define | OBSOLETE_TEST_BLOCKING 8 |
#define | TEST_KEEP_TMP_TABLES 16 |
#define | TEST_READCHECK 64 |
Force use of readcheck. More... | |
#define | TEST_NO_EXTRA 128 |
#define | TEST_CORE_ON_SIGNAL 256 |
Give core if signal. More... | |
#define | TEST_NO_STACKTRACE 512 |
#define | TEST_SIGINT 1024 |
Allow sigint on threads. More... | |
#define | TEST_SYNCHRONIZATION 2048 |
get server to do sleep in \ some places More... | |
#define | TEST_DO_QUICK_LEAK_CHECK 4096 |
Do Valgrind leak check for \ each command. More... | |
#define | TEST_NO_TEMP_TABLES 8192 |
No temp table engine is loaded, so use dummy costs. More... | |
#define | SPECIAL_NO_NEW_FUNC 2 /* Skip new functions */ |
#define | SPECIAL_SKIP_SHOW_DB 4 /* Don't allow 'show db' */ |
#define | SPECIAL_NO_RESOLVE 64 /* Don't use gethostname */ |
#define | SPECIAL_SHORT_LOG_FORMAT 1024 |
#define | mysql_tmpdir (my_tmpdir(&mysql_tmpdir_list)) |
#define | ER(X) please_use_ER_THD_or_ER_DEFAULT_instead(X) |
Typedefs | |
typedef Bitmap< 64 > | Key_map |
typedef int64 | query_id_t |
Functions | |
bool | signal_restart_server () |
Signal the server thread for restart. More... | |
void | kill_mysql (void) |
void | refresh_status () |
Reset global and session status variables. More... | |
void | reset_status_by_thd () |
bool | is_secure_file_path (const char *path) |
Test a file path to determine if the path is compatible with the secure file path restriction. More... | |
ulong | sql_rnd_with_mutex () |
struct System_status_var * | get_thd_status_var (THD *thd, bool *aggregated) |
void | thd_mem_cnt_alloc (THD *thd, size_t size, const char *key_name) |
void | thd_mem_cnt_free (THD *thd, size_t size) |
void | set_remaining_args (int argc, char **argv) |
int | init_common_variables () |
void | my_init_signals () |
bool | gtid_server_init () |
GTID initialization. More... | |
void | gtid_server_cleanup () |
GTID cleanup destroys objects and reset their pointer. More... | |
void | clean_up_mysqld_mutexes () |
enum_server_operational_state | get_server_state () |
Returns the current state of the server : booting, operational or shutting down. More... | |
int * | get_remaining_argc () |
char *** | get_remaining_argv () |
query_id_t | next_query_id () |
bool | connection_events_loop_aborted () |
static void | set_connection_events_loop_aborted (bool value) |
bool | is_help_or_validate_option () |
Check if –help option or –validate-config is specified. More... | |
bool | mysqld_offline_mode () |
Get mysqld offline mode. More... | |
void | set_mysqld_offline_mode (bool value) |
Set offline mode with a given value. More... | |
bool | mysqld_partial_revokes () |
Get status partial_revokes on server. More... | |
void | set_mysqld_partial_revokes (bool value) |
Set partial_revokes with a given value. More... | |
bool | check_and_update_partial_revokes_sysvar (THD *thd) |
If there exists at least one restrictions on any user, then update global variables which track the partial_revokes. More... | |
void | persisted_variables_refresh_keyring_support () |
#define mysql_tmpdir (my_tmpdir(&mysql_tmpdir_list)) |
#define OBSOLETE_TEST_BLOCKING 8 |
#define SPECIAL_NO_NEW_FUNC 2 /* Skip new functions */ |
#define SPECIAL_NO_RESOLVE 64 /* Don't use gethostname */ |
#define SPECIAL_SHORT_LOG_FORMAT 1024 |
#define SPECIAL_SKIP_SHOW_DB 4 /* Don't allow 'show db' */ |
#define TEST_CORE_ON_SIGNAL 256 |
Give core if signal.
#define TEST_DO_QUICK_LEAK_CHECK 4096 |
Do Valgrind leak check for \ each command.
#define TEST_KEEP_TMP_TABLES 16 |
#define TEST_MIT_THREAD 4 |
#define TEST_NO_EXTRA 128 |
#define TEST_NO_KEY_GROUP 2 |
#define TEST_NO_STACKTRACE 512 |
#define TEST_NO_TEMP_TABLES 8192 |
No temp table engine is loaded, so use dummy costs.
#define TEST_PRINT_CACHED_TABLES 1 |
#define TEST_READCHECK 64 |
Force use of readcheck.
#define TEST_SIGINT 1024 |
Allow sigint on threads.
#define TEST_SYNCHRONIZATION 2048 |
get server to do sleep in \ some places
typedef int64 query_id_t |
enum enum_delay_key_write |
bool check_and_update_partial_revokes_sysvar | ( | THD * | thd | ) |
If there exists at least one restrictions on any user, then update global variables which track the partial_revokes.
thd | THD handle |
true | Parital revokes exists; updated the global variables. |
false | Partial revokes does not exist. |
void clean_up_mysqld_mutexes | ( | ) |
|
inline |
int * get_remaining_argc | ( | ) |
char *** get_remaining_argv | ( | ) |
enum_server_operational_state get_server_state | ( | ) |
Returns the current state of the server : booting, operational or shutting down.
struct System_status_var * get_thd_status_var | ( | THD * | thd, |
bool * | aggregated | ||
) |
void gtid_server_cleanup | ( | ) |
GTID cleanup destroys objects and reset their pointer.
Function is reentrant.
bool gtid_server_init | ( | ) |
GTID initialization.
int init_common_variables | ( | ) |
|
inline |
Check if –help option or –validate-config is specified.
false | Neither 'help' or 'validate-config' option is enabled. |
true | Either 'help' or 'validate-config' or both options are enabled. |
bool is_secure_file_path | ( | const char * | path | ) |
Test a file path to determine if the path is compatible with the secure file path restriction.
path | null terminated character string |
true | The path is secure |
false | The path isn't secure |
void kill_mysql | ( | void | ) |
void my_init_signals | ( | ) |
|
inline |
Get mysqld offline mode.
bool mysqld_partial_revokes | ( | ) |
Get status partial_revokes on server.
true | Parital revokes is ON |
flase | Partial revokes is OFF |
|
inline |
void persisted_variables_refresh_keyring_support | ( | ) |
void refresh_status | ( | ) |
Reset global and session status variables.
void reset_status_by_thd | ( | ) |
|
inlinestatic |
|
inline |
Set offline mode with a given value.
value | true or false indicating the offline mode status of server. |
void set_mysqld_partial_revokes | ( | bool | value | ) |
Set partial_revokes with a given value.
value | true or false indicating the status of partial revokes turned ON/OFF on server. |
void set_remaining_args | ( | int | argc, |
char ** | argv | ||
) |
bool signal_restart_server | ( | ) |
Signal the server thread for restart.
ulong sql_rnd_with_mutex | ( | ) |
void thd_mem_cnt_alloc | ( | THD * | thd, |
size_t | size, | ||
const char * | key_name | ||
) |
void thd_mem_cnt_free | ( | THD * | thd, |
size_t | size | ||
) |
|
extern |
|
extern |
Stores the value of argc during server start up that contains the count of arguments specified by the user in the configuration files and command line.
The server refers the cached argument count during plugin and component installation.
|
extern |
Stores the value of argv during server start up that contains the vector of arguments specified by the user in the configuration files and command line.
The server refers the cached argument vector during plugin and component installation.
|
extern |
|
extern |
|
extern |
const char * binary_keyword |
ulong binlog_cache_disk_use |
|
extern |
|
extern |
|
extern |
|
extern |
BINLOG_CHECKSUM variable.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
ulong binlog_stmt_cache_disk_use |
ulong binlog_stmt_cache_size |
|
extern |
|
extern |
|
extern |
True, if clone recovery has failed.
For managed server we restart server again with old database files.
|
extern |
True, if restarted from a cloned database.
This information is needed by GR to set some configurations right after clone.
|
extern |
Statement instrumentation keys (com).
The last entry, at [COM_END], is for packet errors.
|
extern |
|
extern |
|
extern |
ulong connect_timeout |
|
extern |
Number of connection errors from internal server errors.
|
extern |
Number of errors when reading the peer address.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
ulong delayed_queue_size |
|
extern |
|
extern |
Flag indicating if dynamic plugins have been loaded.
Only to be accessed by main thread.
|
extern |
ulong flush_time |
|
extern |
This variable holds handle to the object that's responsible for loading/unloading components from manifest file.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
uint ha_open_options |
|
extern |
|
extern |
The size of the host_cache.
|
extern |
name of reference on left expression in rewritten IN subquery
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
The below lock protects access to two global server variables: max_prepared_stmt_count and prepared_stmt_count.
These variables set the limit and hold the current total number of prepared statements in the server, respectively. As PREPARE/DEALLOCATE rate in a loaded server may be fairly high, we need a dedicated lock.
|
extern |
Protects slave_list in rpl_source.cc; the list of currently running dump threads with metadata for the replica.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
ulonglong max_binlog_stmt_cache_size |
|
extern |
|
extern |
|
extern |
|
extern |
Limit of the total number of prepared statements in the server.
Is necessary to protect the server against out-of-memory attacks.
ulong max_relay_log_size |
|
extern |
|
extern |
Variable to check if connection related options are set as part of keyring migration.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
bool mysql_native_password_proxy_users |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
uint mysqld_port |
MYSQL_PLUGIN_IMPORT bool mysqld_server_started |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
char * opt_bin_logname |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
bool opt_general_log_raw |
|
extern |
|
extern |
|
extern |
|
extern |
LEX_STRING opt_init_replica |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
bool opt_log_slow_replica_statements |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
uint opt_mta_checkpoint_group |
uint opt_mta_checkpoint_period |
|
extern |
|
extern |
bool opt_myisam_use_mmap |
|
extern |
bool opt_noacl |
|
extern |
|
extern |
|
extern |
bool opt_readonly |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
bool opt_skip_show_db |
bool opt_slow_log |
char * opt_slow_logname |
|
extern |
|
extern |
bool opt_super_readonly |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
MYSQL_PLUGIN_IMPORT int orig_argc |
MYSQL_PLUGIN_IMPORT char** orig_argv |
|
extern |
|
extern |
|
extern |
char * pidfile_name_ptr |
ulong prepared_stmt_count |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
uint select_errors |
|
extern |
|
extern |
MYSQL_PLUGIN_IMPORT ulong server_id |
|
extern |
|
extern |
|
extern |
|
extern |
MYSQL_PLUGIN_IMPORT char server_version[SERVER_VERSION_LENGTH] |
bool sha256_password_proxy_users |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
used by sql_class.cc:THD::THD()
|
extern |
Statement instrumentation keys (sql).
The last entry, at [SQLCOM_END], is for parsing errors.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Statement instrumentation key for replication.
|
extern |
Soft upper limit for number of sp_head objects that can be stored in the sp_cache for one connection.
|
extern |
|
extern |
uint sync_masterinfo_period |
uint sync_relaylog_period |
uint sync_relayloginfo_period |
char system_time_zone_dst_off[30] |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
ulong tc_log_max_pages_used |
ulong tc_log_page_size |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |