24#ifndef MY_DEFAULT_INCLUDED
25#define MY_DEFAULT_INCLUDED
48 const char *option,
const char *cnf_file);
53 char **extra_defaults,
char **group_suffix,
54 char **login_path,
bool found_no_defaults,
55 bool *found_no_login_paths);
59 int *argc,
char ***argv,
MEM_ROOT *alloc,
63int load_defaults(
const char *conf_file,
const char **groups,
int *argc,
68 bool is_login_file,
bool found_no_defaults);
static const char ** default_directories
Definition: my_default.cc:214
int load_defaults(const char *conf_file, const char **groups, int *argc, char ***argv, MEM_ROOT *alloc)
Definition: my_default.cc:660
bool no_defaults
Definition: my_default.cc:208
char datadir_buffer[]
Holds a reference to the directory where the persisted configuration file is located.
Definition: my_default.cc:131
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...
Definition: my_default.cc:1577
int(* Process_option_func)(void *ctx, const char *group_name, const char *option, const char *cnf_file)
Definition: my_default.h:47
bool my_getopt_is_ro_persist_args_separator(const char *arg)
Definition: my_default.cc:181
int get_defaults_options(int argc, char **argv, char **defaults, char **extra_defaults, char **group_suffix, char **login_path, bool found_no_defaults, bool *found_no_login_paths)
Definition: my_default.cc:570
bool my_getopt_use_args_separator
Definition: my_default.cc:191
bool my_defaults_read_login_file
A global to turn off or on reading the mylogin file.
Definition: my_default.cc:667
void set_persist_args_separator(char **arg)
Definition: my_default.cc:178
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)
Definition: my_default.cc:346
int my_load_defaults(const char *conf_file, const char **groups, int *argc, char ***argv, MEM_ROOT *alloc, const char ***)
Definition: my_default.cc:706
const char * my_defaults_group_suffix
Definition: my_default.cc:197
const char * my_defaults_extra_file
Definition: my_default.cc:198
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 op...
Definition: my_default.cc:1492
void my_print_default_files(const char *conf_file)
Definition: my_default.cc:1316
bool my_getopt_is_args_separator(const char *arg)
Definition: my_default.cc:192
const char * my_defaults_file
Definition: my_default.cc:196
int check_file_permissions(const char *file_name, bool is_login_file, myf MyFlags=0)
Check file permissions of the option file.
Definition: my_default.cc:1763
void init_variable_default_paths()
Initialize all the mappings between default config file paths/ command line options/persistent config...
Definition: my_default.cc:1400
void print_defaults(const char *conf_file, const char **groups)
Definition: my_default.cc:1364
Some integer typedefs for easier portability.
int myf
Definition: my_inttypes.h:94
std::string file_name(Log_file_id file_id)
Provides name of the log file with the given file id, e.g.
Definition: log0pre_8_0_30.cc:94
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83