53#define GET_STR_ALLOC 10
54#define GET_DISABLED 11
59#define GET_PASSWORD 16
62#define GET_INT32 GET_INT
63#define GET_UINT32 GET_UINT
65#define GET_INT32 GET_LONG
66#define GET_UINT32 GET_ULONG
68#error Neither int or long is of 4 bytes width
71#define GET_ASK_ADDR 128
72#define GET_TYPE_MASK 127
138typedef void *(*my_getopt_value)(
const char *, size_t,
const struct my_option *,
154 bool ignore_unknown_option);
158 bool ignore_unknown_option,
bool boolean_as_int);
181template <
typename LLorULL>
183 const char *option_name);
void(* my_error_reporter)(enum loglevel level, uint ecode,...)
Definition: my_sys.h:484
void my_print_help(const struct my_option *options)
Definition: my_getopt.cc:1513
bool log_replica_updates_supplied
Definition: mysqld.cc:1663
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:1594
get_opt_arg_type
Enumeration of the my_option::arg_type attributes.
Definition: my_getopt.h:81
@ OPT_ARG
Definition: my_getopt.h:81
@ REQUIRED_ARG
Definition: my_getopt.h:81
@ NO_ARG
Definition: my_getopt.h:81
bool replica_preserve_commit_order_supplied
Definition: mysqld.cc:1669
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:145
int findopt(const char *, uint, const struct my_option **)
Find option.
Definition: my_getopt.cc:993
LLorULL eval_num_suffix(const char *argument, int *error, const char *option_name)
Definition: my_getopt.cc:1037
bool my_getopt_skip_unknown
Definition: my_getopt.cc:111
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:691
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:264
my_error_reporter my_getopt_error_reporter
Definition: my_getopt.cc:65
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:138
void my_cleanup_options(const struct my_option *options)
Definition: my_getopt.cc:1457
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp, bool *fix)
Definition: my_getopt.cc:1262
bool my_getopt_print_errors
Definition: my_getopt.cc:104
void my_getopt_register_get_addr(my_getopt_value)
Definition: my_getopt.cc:115
bool get_bool_argument(const char *argument, bool *error)
Parse a boolean command line argument.
Definition: my_getopt.cc:763
char * disabled_my_option
Definition: my_getopt.cc:94
bool is_key_cache_variable_suffix(std::string_view suffix)
Definition: my_getopt.cc:119
ulonglong getopt_double2ulonglong(double)
Returns an ulonglong value containing a raw representation of the given double value.
Definition: my_getopt.cc:160
double getopt_double_limit_value(double num, const struct my_option *optp, bool *fix)
Definition: my_getopt.cc:1302
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:703
double getopt_ulonglong2double(ulonglong)
Returns the double value which corresponds to the given raw representation.
Definition: my_getopt.cc:171
ulonglong max_of_int_range(int var_type)
Maximum possible value for an integer GET_* variable type.
Definition: my_getopt.cc:1163
bool(* my_get_one_option)(int, const struct my_option *, char *)
Definition: my_getopt.h:131
longlong getopt_ll_limit_value(longlong, const struct my_option *, bool *fix)
Definition: my_getopt.cc:1190
void my_print_variables(const struct my_option *options)
function: my_print_variables Print variables.
Definition: my_getopt.cc:1583
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
long long int longlong
Definition: my_inttypes.h:55
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:83
Common header for many mysys elements.
void error(const char *format,...)
const std::string FILE("FILE")
Definition: options.cc:57
Definition: my_getopt.h:83
char m_path_name[FN_REFLEN]
config file path OR compiled default values
Definition: my_getopt.h:87
enum enum_variable_source m_source
Definition: my_getopt.h:88
Definition: my_getopt.h:93
const char * comment
option comment, for autom.
Definition: my_getopt.h:113
longlong min_value
Min allowed value (for numbers)
Definition: my_getopt.h:123
ulonglong max_value
Max allowed value (for numbers)
Definition: my_getopt.h:124
longlong def_value
Default value.
Definition: my_getopt.h:122
void * app_type
To be used by an application.
Definition: my_getopt.h:128
long block_size
Value should be a mult.
Definition: my_getopt.h:127
const char * name
Name of the option.
Definition: my_getopt.h:94
void * u_max_value
The user def.
Definition: my_getopt.h:118
ulong var_type
GET_BOOL, GET_ULL, etc.
Definition: my_getopt.h:120
TYPELIB * typelib
Pointer to possible values.
Definition: my_getopt.h:119
void * value
A pointer to the variable value.
Definition: my_getopt.h:117
enum get_opt_arg_type arg_type
e.g.
Definition: my_getopt.h:121
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:98
struct get_opt_arg_source * arg_source
Represents source/path from where this variable is set.
Definition: my_getopt.h:125
enum_variable_source
This enum values define how system variables are set.
Definition: system_variable_source_type.h:33