diff options
author | He Zhenxing <zhenxing.he@sun.com> | 2009-10-02 16:25:53 +0800 |
---|---|---|
committer | He Zhenxing <zhenxing.he@sun.com> | 2009-10-02 16:25:53 +0800 |
commit | 9739efbfec4c069996cf2f46f165e555a7edf30f (patch) | |
tree | 579cf79cc98b55b5b950b8325984464a251a362b /extra | |
parent | bb6953d1d80e5fef2e333e0a4147aa5a43e809ab (diff) | |
download | mariadb-git-9739efbfec4c069996cf2f46f165e555a7edf30f.tar.gz |
Backport BUG#25192 Using relay-log and relay-log-index without values produces unexpected results.
Options loaded from config files were added before command line
arguments, and they were parsed together, which could interprete
the following:
option-a
option-b
as --option-a=--option-b if 'option-a' requires a value, and
caused confusing.
Because all options that requires a value are always given in
the form '--option=value', so it's an error if there is no
'=value' part for such an option read from config file.
This patch added a separator to separate the arguments from
config files and that from command line, so that they can be
handled differently. And report an error for options loaded
from config files that requires a value and is not given in the
form '--option=value'.
Diffstat (limited to 'extra')
-rw-r--r-- | extra/my_print_defaults.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c index 06f7e51c380..42a5cbd6877 100644 --- a/extra/my_print_defaults.c +++ b/extra/my_print_defaults.c @@ -192,7 +192,8 @@ int main(int argc, char **argv) } for (argument= arguments+1 ; *argument ; argument++) - puts(*argument); + if (*argument != args_separator) /* skip arguments separator */ + puts(*argument); my_free((char*) load_default_groups,MYF(0)); free_defaults(arguments); |