diff options
author | He Zhenxing <hezx@greatopensource.com> | 2011-01-17 15:44:37 +0800 |
---|---|---|
committer | He Zhenxing <hezx@greatopensource.com> | 2011-01-17 15:44:37 +0800 |
commit | b695495ea7ad57b2f2b4e7f73c179b7c3d056402 (patch) | |
tree | 37a584099deb64bea3ff4693b872e856a9357eaa /include/my_sys.h | |
parent | 67bcf3e3be9e2884dd9454d90e1b362cabc3566b (diff) | |
download | mariadb-git-b695495ea7ad57b2f2b4e7f73c179b7c3d056402.tar.gz |
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.
Diffstat (limited to 'include/my_sys.h')
-rw-r--r-- | include/my_sys.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 96b40415c56..484dc684b03 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -817,7 +817,8 @@ extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len); extern int get_defaults_options(int argc, char **argv, char **defaults, char **extra_defaults, char **group_suffix); -extern const char *args_separator; +extern my_bool my_getopt_use_args_separator; +extern my_bool my_getopt_is_args_separator(const char* arg); extern int my_load_defaults(const char *conf_file, const char **groups, int *argc, char ***argv, const char ***); extern int load_defaults(const char *conf_file, const char **groups, |