MySQL 9.0.0
Source Code Documentation
|
"public" interface to sys_var - server configuration variables. More...
#include "my_config.h"
#include <sys/types.h>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <functional>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
#include <map>
#include "lex_string.h"
#include "my_getopt.h"
#include "my_hostname.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "my_systime.h"
#include "mysql/components/services/system_variable_source_type.h"
#include "mysql/status_var.h"
#include "mysql/strings/m_ctype.h"
#include "mysql/udf_registration_types.h"
#include "mysql_com.h"
#include "prealloced_array.h"
#include "sql/sql_const.h"
#include "sql/sql_plugin_ref.h"
#include "typelib.h"
Go to the source code of this file.
Classes | |
struct | sys_var_chain |
class | sys_var |
A class representing one system variable - that is something that can be accessed as @global.variable_name or @session.variable_name, visible in SHOW xxx VARIABLES and in INFORMATION_SCHEMA.xxx_VARIABLES, optionally it can be assigned to, optionally it can have a command-line counterpart with the same name. More... | |
class | System_variable_tracker |
Wrapper interface for all kinds of system variables. More... | |
struct | System_variable_tracker::Static |
struct | System_variable_tracker::Keycache |
struct | System_variable_tracker::Plugin |
struct | System_variable_tracker::Component |
struct | System_variable_tracker::Cache |
class | set_var_base |
A base class for everything that can be set with SET command. More... | |
class | set_var |
set_var_base descendant for assignments to the system variables. More... | |
class | set_var_user |
class | set_var_password |
class | set_var_collation_client |
Macros | |
#define | PERSIST_ONLY_ADMIN_X509_SUBJECT "persist_only_admin_x509_subject" |
#define | PERSISTED_GLOBALS_LOAD "persisted_globals_load" |
Typedefs | |
using | sql_mode_t = uint64_t |
typedef enum enum_mysql_show_type | SHOW_TYPE |
typedef enum enum_mysql_show_scope | SHOW_SCOPE |
Enumerations | |
enum | enum_var_type : int { OPT_DEFAULT = 0 , OPT_SESSION , OPT_GLOBAL , OPT_PERSIST , OPT_PERSIST_ONLY } |
enum class | Suppress_not_found_error { NO , YES } |
enum class | Force_sensitive_system_variable_access { NO , YES } |
enum class | Is_already_locked { NO , YES } |
enum class | Is_single_thread { NO , YES } |
Functions | |
bool | add_static_system_variable_chain (sys_var *chain) |
Add variables to the hash of static system variables. More... | |
bool | add_dynamic_system_variable_chain (sys_var *chain) |
Add variables to the dynamic hash of system variables. More... | |
void | delete_dynamic_system_variable_chain (sys_var *chain) |
Remove variables from the dynamic hash of system variables. More... | |
ulong | get_system_variable_count (void) |
ulonglong | get_dynamic_system_variable_hash_version (void) |
collation_unordered_map< std::string, sys_var * > * | get_static_system_variable_hash (void) |
collation_unordered_map< std::string, sys_var * > * | get_dynamic_system_variable_hash (void) |
bool | get_global_variable_attributes (const char *variable_base, const char *variable_name, std::vector< std::pair< std::string, std::string > > &attributes) |
bool | get_global_variable_attribute (const char *variable_base, const char *variable_name, const char *attribute_name, std::string &value) |
bool | set_global_variable_attribute (const char *variable_base, const char *variable_name, const char *attribute_name, const char *attribute_value) |
bool | set_global_variable_attribute (const System_variable_tracker &var_tracker, const char *attribute_name, const char *attribute_value) |
bool | get_sysvar_source (const char *name, uint length, enum enum_variable_source *source) |
Get source of a given system variable given its name and name length. More... | |
int | sql_set_variables (THD *thd, List< set_var_base > *var_list, bool opened) |
Execute update of all variables. More... | |
bool | keyring_access_test () |
This function is used to check if key management UDFs like keying_key_generate/store/remove should proceed or not. More... | |
bool | fix_delay_key_write (sys_var *self, THD *thd, enum_var_type type) |
sql_mode_t | expand_sql_mode (sql_mode_t sql_mode, THD *thd) |
bool | sql_mode_string_representation (THD *thd, sql_mode_t sql_mode, LEX_STRING *ls) |
bool | sql_mode_quoted_string_representation (THD *thd, sql_mode_t sql_mode, LEX_STRING *ls) |
const CHARSET_INFO * | get_old_charset_by_name (const char *old_name) |
int | sys_var_init () |
int | sys_var_add_options (std::vector< my_option > *long_options, int parse_flags) |
void | sys_var_end (void) |
bool | check_priv (THD *thd, bool static_variable) |
This function will check for necessary privileges needed to perform RESET PERSIST or SET PERSIST[_ONLY] operation. More... | |
Variables | |
TYPELIB | bool_typelib |
SHOW_COMP_OPTION | have_profiling |
SHOW_COMP_OPTION | have_symlink |
SHOW_COMP_OPTION | have_dlopen |
SHOW_COMP_OPTION | have_query_cache |
SHOW_COMP_OPTION | have_geometry |
SHOW_COMP_OPTION | have_rtree_keys |
SHOW_COMP_OPTION | have_compress |
SHOW_COMP_OPTION | have_statement_timeout |
sys_var * | Sys_autocommit_ptr |
sys_var * | Sys_gtid_next_ptr |
sys_var * | Sys_gtid_next_list_ptr |
sys_var * | Sys_gtid_purged_ptr |
ulonglong | dynamic_system_variable_hash_version |
char * | sys_var_persist_only_admin_x509_subject |
global X509 subject name to require from the client session to allow SET PERSIST[_ONLY] on sys_var::NOTPERSIST variables More... | |
"public" interface to sys_var - server configuration variables.
#define PERSIST_ONLY_ADMIN_X509_SUBJECT "persist_only_admin_x509_subject" |
#define PERSISTED_GLOBALS_LOAD "persisted_globals_load" |
typedef enum enum_mysql_show_scope SHOW_SCOPE |
typedef enum enum_mysql_show_type SHOW_TYPE |
using sql_mode_t = uint64_t |
enum enum_var_type : int |
|
strong |
|
strong |
|
strong |
|
strong |
bool add_dynamic_system_variable_chain | ( | sys_var * | first | ) |
Add variables to the dynamic hash of system variables.
first | Pointer to first system variable to add |
bool add_static_system_variable_chain | ( | sys_var * | first | ) |
Add variables to the hash of static system variables.
first | Pointer to first system variable to add |
bool check_priv | ( | THD * | thd, |
bool | static_variable | ||
) |
This function will check for necessary privileges needed to perform RESET PERSIST or SET PERSIST[_ONLY] operation.
[in] | thd | Pointer to connection handle. |
[in] | static_variable | describes if variable is static or dynamic |
void delete_dynamic_system_variable_chain | ( | sys_var * | first | ) |
Remove variables from the dynamic hash of system variables.
first | Pointer to first system variable to remove |
sql_mode_t expand_sql_mode | ( | sql_mode_t | sql_mode, |
THD * | thd | ||
) |
bool fix_delay_key_write | ( | sys_var * | self, |
THD * | thd, | ||
enum_var_type | type | ||
) |
collation_unordered_map< std::string, sys_var * > * get_dynamic_system_variable_hash | ( | void | ) |
ulonglong get_dynamic_system_variable_hash_version | ( | void | ) |
bool get_global_variable_attribute | ( | const char * | variable_base, |
const char * | variable_name, | ||
const char * | attribute_name, | ||
std::string & | value | ||
) |
bool get_global_variable_attributes | ( | const char * | variable_base, |
const char * | variable_name, | ||
std::vector< std::pair< std::string, std::string > > & | attributes | ||
) |
const CHARSET_INFO * get_old_charset_by_name | ( | const char * | old_name | ) |
collation_unordered_map< std::string, sys_var * > * get_static_system_variable_hash | ( | void | ) |
ulong get_system_variable_count | ( | void | ) |
bool get_sysvar_source | ( | const char * | name, |
uint | length, | ||
enum enum_variable_source * | source | ||
) |
Get source of a given system variable given its name and name length.
bool keyring_access_test | ( | ) |
This function is used to check if key management UDFs like keying_key_generate/store/remove should proceed or not.
If global variable @keyring_operations is OFF then above said udfs will fail.
0 | OK |
1 | ERROR, keyring operations are not allowed |
bool set_global_variable_attribute | ( | const char * | variable_base, |
const char * | variable_name, | ||
const char * | attribute_name, | ||
const char * | attribute_value | ||
) |
bool set_global_variable_attribute | ( | const System_variable_tracker & | var_tracker, |
const char * | attribute_name, | ||
const char * | attribute_value | ||
) |
bool sql_mode_quoted_string_representation | ( | THD * | thd, |
sql_mode_t | sql_mode, | ||
LEX_STRING * | ls | ||
) |
bool sql_mode_string_representation | ( | THD * | thd, |
sql_mode_t | sql_mode, | ||
LEX_STRING * | ls | ||
) |
int sql_set_variables | ( | THD * | thd, |
List< set_var_base > * | var_list, | ||
bool | opened | ||
) |
Execute update of all variables.
First run a check of all variables that all updates will go ok. If yes, then execute all updates, returning an error if any one failed.
This should ensure that in all normal cases none all or variables are updated.
thd | Thread id |
var_list | List of variables to update |
opened | True means tables are open and this function will lock them. |
0 | ok |
1 | ERROR, message sent (normally no variables was updated) |
-1 | ERROR, message not sent |
int sys_var_add_options | ( | std::vector< my_option > * | long_options, |
int | parse_flags | ||
) |
void sys_var_end | ( | void | ) |
int sys_var_init | ( | ) |
|
extern |
|
extern |
|
extern |
SHOW_COMP_OPTION have_dlopen |
|
extern |
|
extern |
|
extern |
SHOW_COMP_OPTION have_rtree_keys |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
global X509 subject name to require from the client session to allow SET PERSIST[_ONLY] on sys_var::NOTPERSIST variables