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 /sql-common | |
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 'sql-common')
-rw-r--r-- | sql-common/client.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 84029b449af..cbed3a5e2a8 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1053,6 +1053,8 @@ void mysql_read_default_options(struct st_mysql_options *options, char **option=argv; while (*++option) { + if (option[0] == args_separator) /* skip arguments separator */ + continue; /* DBUG_PRINT("info",("option: %s",option[0])); */ if (option[0][0] == '-' && option[0][1] == '-') { |