52#define GET_STR_ALLOC 10
53#define GET_DISABLED 11
58#define GET_PASSWORD 16
61#define GET_INT32 GET_INT
62#define GET_UINT32 GET_UINT
64#define GET_INT32 GET_LONG
65#define GET_UINT32 GET_ULONG
67#error Neither int or long is of 4 bytes width
70#define GET_ASK_ADDR 128
71#define GET_TYPE_MASK 127
137typedef void *(*my_getopt_value)(
const char *, size_t,
const struct my_option *,
153 bool ignore_unknown_option);
157 bool ignore_unknown_option,
bool boolean_as_int);
180template <
typename LLorULL>
182 const char *option_name);
void(* my_error_reporter)(enum loglevel level, uint ecode,...)
Definition: my_sys.h:481
void my_print_help(const struct my_option *options)
Definition: my_getopt.cc:1512
bool log_replica_updates_supplied
Definition: mysqld.cc:1667
void my_print_variables_ex(const struct my_option *options, FILE *file)
function: my_print_variables_ex Print variables to given file parameter stream (by default to stdout)...
Definition: my_getopt.cc:1593
get_opt_arg_type
Enumeration of the my_option::arg_type attributes.
Definition: my_getopt.h:80
@ OPT_ARG
Definition: my_getopt.h:80
@ REQUIRED_ARG
Definition: my_getopt.h:80
@ NO_ARG
Definition: my_getopt.h:80
bool replica_preserve_commit_order_supplied
Definition: mysqld.cc:1673
int handle_options(int *argc, char ***argv, const struct my_option *longopts, my_get_one_option)
Wrapper around my_handle_options() for interface compatibility.
Definition: my_getopt.cc:144
int findopt(const char *, uint, const struct my_option **)
Find option.
Definition: my_getopt.cc:992
LLorULL eval_num_suffix(const char *argument, int *error, const char *option_name)
Definition: my_getopt.cc:1036
bool my_getopt_skip_unknown
Definition: my_getopt.cc:110
int my_handle_options(int *argc, char ***argv, const struct my_option *longopts, my_get_one_option, const char **command_list, bool ignore_unknown_option)
Definition: my_getopt.cc:690
int my_handle_options2(int *argc, char ***argv, const struct my_option *longopts, my_get_one_option, const char **command_list, bool ignore_unknown_option, bool boolean_as_int)
Handle command line options.
Definition: my_getopt.cc:263
my_error_reporter my_getopt_error_reporter
Definition: my_getopt.cc:64
void *(* my_getopt_value)(const char *, size_t, const struct my_option *, int *)
Used to retrieve a reference to the object (variable) that holds the value for the given option.
Definition: my_getopt.h:137
void my_cleanup_options(const struct my_option *options)
Definition: my_getopt.cc:1456
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp, bool *fix)
Definition: my_getopt.cc:1261
bool my_getopt_print_errors
Definition: my_getopt.cc:103
void my_getopt_register_get_addr(my_getopt_value)
Definition: my_getopt.cc:114
bool get_bool_argument(const char *argument, bool *error)
Parse a boolean command line argument.
Definition: my_getopt.cc:762
char * disabled_my_option
Definition: my_getopt.cc:93
bool is_key_cache_variable_suffix(std::string_view suffix)
Definition: my_getopt.cc:118
ulonglong getopt_double2ulonglong(double)
Returns an ulonglong value containing a raw representation of the given double value.
Definition: my_getopt.cc:159
double getopt_double_limit_value(double num, const struct my_option *optp, bool *fix)
Definition: my_getopt.cc:1301
void print_cmdline_password_warning()
This function should be called to print a warning message if password string is specified on the comm...
Definition: my_getopt.cc:702
double getopt_ulonglong2double(ulonglong)
Returns the double value which corresponds to the given raw representation.
Definition: my_getopt.cc:170
ulonglong max_of_int_range(int var_type)
Maximum possible value for an integer GET_* variable type.
Definition: my_getopt.cc:1162
bool(* my_get_one_option)(int, const struct my_option *, char *)
Definition: my_getopt.h:130
longlong getopt_ll_limit_value(longlong, const struct my_option *, bool *fix)
Definition: my_getopt.cc:1189
void my_print_variables(const struct my_option *options)
function: my_print_variables Print variables.
Definition: my_getopt.cc:1582
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
long long int longlong
Definition: my_inttypes.h:54
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:82
Common header for many mysys elements.
const std::string FILE("FILE")
Definition: options.cc:56
Definition: my_getopt.h:82
char m_path_name[FN_REFLEN]
config file path OR compiled default values
Definition: my_getopt.h:86
enum enum_variable_source m_source
Definition: my_getopt.h:87
Definition: my_getopt.h:92
const char * comment
option comment, for autom.
Definition: my_getopt.h:112
longlong min_value
Min allowed value (for numbers)
Definition: my_getopt.h:122
ulonglong max_value
Max allowed value (for numbers)
Definition: my_getopt.h:123
longlong def_value
Default value.
Definition: my_getopt.h:121
void * app_type
To be used by an application.
Definition: my_getopt.h:127
long block_size
Value should be a mult.
Definition: my_getopt.h:126
const char * name
Name of the option.
Definition: my_getopt.h:93
void * u_max_value
The user def.
Definition: my_getopt.h:117
ulong var_type
GET_BOOL, GET_ULL, etc.
Definition: my_getopt.h:119
TYPELIB * typelib
Pointer to possible values.
Definition: my_getopt.h:118
void * value
A pointer to the variable value.
Definition: my_getopt.h:116
enum get_opt_arg_type arg_type
e.g.
Definition: my_getopt.h:120
int id
For 0<id<=255 it's means one character for a short option (like -A), if >255 no short option is creat...
Definition: my_getopt.h:97
struct get_opt_arg_source * arg_source
Represents source/path from where this variable is set.
Definition: my_getopt.h:124
enum_variable_source
This enum values define how system variables are set.
Definition: system_variable_source_type.h:32