MySQL 8.0.39
Source Code Documentation
|
Go to the source code of this file.
Typedefs | |
typedef int(* | Process_option_func) (void *ctx, const char *group_name, const char *option, const char *cnf_file) |
Functions | |
void | set_persist_args_separator (char **arg) |
bool | my_getopt_is_args_separator (const char *arg) |
bool | my_getopt_is_ro_persist_args_separator (const char *arg) |
int | get_defaults_options (int argc, char **argv, char **defaults, char **extra_defaults, char **group_suffix, char **login_path, bool found_no_defaults) |
int | my_load_defaults (const char *conf_file, const char **groups, int *argc, char ***argv, MEM_ROOT *alloc, const char ***) |
int | check_file_permissions (const char *file_name, bool is_login_file, myf MyFlags=0) |
Check file permissions of the option file. More... | |
int | load_defaults (const char *conf_file, const char **groups, int *argc, char ***argv, MEM_ROOT *alloc) |
int | my_search_option_files (const char *conf_file, int *argc, char ***argv, uint *args_used, Process_option_func func, void *func_ctx, const char **default_directories, bool is_login_file, bool found_no_defaults) |
void | my_print_default_files (const char *conf_file) |
void | print_defaults (const char *conf_file, const char **groups) |
void | init_variable_default_paths () |
Initialize all the mappings between default config file paths/ command line options/persistent config file path/login file path and corresponding enum_variable_source values. More... | |
void | update_variable_source (const char *opt_name, const char *config_file) |
Track all options loaded from config files and command line options along with the path from where options are loaded. More... | |
void | set_variable_source (const char *opt_name, void *value) |
This function will set value for my_option::arg_source by doing a lookup into variables_hash based on opt_name as key. More... | |
Variables | |
const char * | my_defaults_extra_file |
const char * | my_defaults_group_suffix |
const char * | my_defaults_file |
bool | my_getopt_use_args_separator |
bool | my_defaults_read_login_file |
A global to turn off or on reading the mylogin file. More... | |
bool | no_defaults |
char | datadir_buffer [] |
Holds a reference to the directory where the persisted configuration file is located. More... | |
typedef int(* Process_option_func) (void *ctx, const char *group_name, const char *option, const char *cnf_file) |
int check_file_permissions | ( | const char * | file_name, |
bool | is_login_file, | ||
myf | flags | ||
) |
Check file permissions of the option file.
[in] | file_name | Name of the option file. |
[in] | is_login_file | TRUE, when login file is being processed. |
[in] | flags | error handling flags |
int get_defaults_options | ( | int | argc, |
char ** | argv, | ||
char ** | defaults, | ||
char ** | extra_defaults, | ||
char ** | group_suffix, | ||
char ** | login_path, | ||
bool | found_no_defaults | ||
) |
void init_variable_default_paths | ( | ) |
Initialize all the mappings between default config file paths/ command line options/persistent config file path/login file path and corresponding enum_variable_source values.
int load_defaults | ( | const char * | conf_file, |
const char ** | groups, | ||
int * | argc, | ||
char *** | argv, | ||
MEM_ROOT * | alloc | ||
) |
bool my_getopt_is_args_separator | ( | const char * | arg | ) |
bool my_getopt_is_ro_persist_args_separator | ( | const char * | arg | ) |
int my_load_defaults | ( | const char * | conf_file, |
const char ** | groups, | ||
int * | argc, | ||
char *** | argv, | ||
MEM_ROOT * | alloc, | ||
const char *** | default_directories | ||
) |
void my_print_default_files | ( | const char * | conf_file | ) |
int my_search_option_files | ( | const char * | conf_file, |
int * | argc, | ||
char *** | argv, | ||
uint * | args_used, | ||
Process_option_func | func, | ||
void * | func_ctx, | ||
const char ** | default_directories, | ||
bool | is_login_file, | ||
bool | found_no_defaults | ||
) |
copy group
Construct new group
copy group
Construct new group
void print_defaults | ( | const char * | conf_file, |
const char ** | groups | ||
) |
void set_persist_args_separator | ( | char ** | arg | ) |
void set_variable_source | ( | const char * | opt_name, |
void * | value | ||
) |
This function will set value for my_option::arg_source by doing a lookup into variables_hash based on opt_name as key.
If key is present corresponding value (config file, enum value) will be set in value.
[in] | opt_name | Pointer to option name. |
[out] | value | Pointer to struct holding config file path and variable source |
void update_variable_source | ( | const char * | opt_name, |
const char * | value | ||
) |
Track all options loaded from config files and command line options along with the path from where options are loaded.
For command line options path is empty string.
Ex: /etc/my.cnf has max_connections /$datadir/mysqld.auto.cnf has max_user_connections ./mysqld –server-id=47 with this setup, variables_hash has 3 entries of the above options along with path of config files and its enum value which is as below: max_connections -> (/etc/my.cnf , enum_variable_source::GLOBAL) max_user_connections -> ($datadir/mysqld.auto.cnf , enum_variable_source::PERSISTED) server-id -> ("" , enum_variable_source::COMMAND_LINE)
[in] | opt_name | Pointer to option name. opt_name must be in the form off –XXXXXX |
[in] | value | Pointer to config file path |
|
extern |
Holds a reference to the directory where the persisted configuration file is located.
This usually is the data directory. This is different from mysql_real_data_home mostly because it's passed down to mysys. And is also filled in a bit differently from mysql_real_data_home by Persisted_variables_cache::init()
|
extern |
|
extern |
|
extern |
|
extern |
A global to turn off or on reading the mylogin file.
On by default
|
extern |
|
extern |