summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorHe Zhenxing <hezx@greatopensource.com>2011-01-17 15:44:37 +0800
committerHe Zhenxing <hezx@greatopensource.com>2011-01-17 15:44:37 +0800
commitb695495ea7ad57b2f2b4e7f73c179b7c3d056402 (patch)
tree37a584099deb64bea3ff4693b872e856a9357eaa /sql-common
parent67bcf3e3be9e2884dd9454d90e1b362cabc3566b (diff)
downloadmariadb-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 'sql-common')
-rw-r--r--sql-common/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 354c04b717b..3b7fc11a537 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1207,7 +1207,7 @@ void mysql_read_default_options(struct st_mysql_options *options,
char **option=argv;
while (*++option)
{
- if (option[0] == args_separator) /* skip arguments separator */
+ if (my_getopt_is_args_separator(option[0])) /* skip arguments separator */
continue;
/* DBUG_PRINT("info",("option: %s",option[0])); */
if (option[0][0] == '-' && option[0][1] == '-')