mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#57953 my_load_defaults return junk argument ----args-separator---- to caller
After fix of bug#25192, load_defaults() will add an args separator to distinguish options loaded from configure files from that provided in the command line. One problem of this is that the args separator would be added no matter the application need it or not. Fixed the problem by adding an option: bool my_getopt_use_args_separator; to control whether the separator will be added or not. And also added functions: bool my_getopt_is_args_separator(const char* arg); to check if the argument is the separator or not.
This commit is contained in:
@ -4207,8 +4207,10 @@ int mysqld_main(int argc, char **argv)
|
||||
|
||||
orig_argc= argc;
|
||||
orig_argv= argv;
|
||||
my_getopt_use_args_separator= TRUE;
|
||||
if (load_defaults(MYSQL_CONFIG_NAME, load_default_groups, &argc, &argv))
|
||||
return 1;
|
||||
my_getopt_use_args_separator= FALSE;
|
||||
defaults_argc= argc;
|
||||
defaults_argv= argv;
|
||||
remaining_argc= argc;
|
||||
|
Reference in New Issue
Block a user