summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-10-16 21:55:53 +0300
committerMichael Widenius <monty@askmonty.org>2011-10-16 21:55:53 +0300
commite3e60a4102d6918e4231e402bef89b1a6b2a20cb (patch)
treeb1a0ea5a089a143f68ffcdfbc2b6e64b80bdf217 /mysys
parentf1b2ecc4378fee821712790e184e629e942b3cc4 (diff)
downloadmariadb-git-e3e60a4102d6918e4231e402bef89b1a6b2a20cb.tar.gz
Fixed wrong info message for mysqld --general-log
Fixed wrong parameter type for --general-log. Now one can enable it with --general-log= 1 | true | on Fixed that bool parameters can also take 'on' and 'off' as parameters. This is in line with the values assigned to them in mysqld. mysys/my_getopt.c: Fixed that bool parameters can also take 'on' and 'off' as parameters. sql/mysqld.cc: Fixed wrong info message for mysqld --general-log Fixed wrong parameter type for --general-log. Now one can enable it with --general-log= 1 | true | on
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_getopt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 5d0703f09a8..82f2b6962e5 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -396,10 +396,12 @@ int handle_options(int *argc, char ***argv,
*/
(*argc)--;
if (!optend || *optend == '1' ||
- !my_strcasecmp(&my_charset_latin1, optend, "true"))
+ !my_strcasecmp(&my_charset_latin1, optend, "true") ||
+ !my_strcasecmp(&my_charset_latin1, optend, "on"))
*((my_bool*) value)= (my_bool) 1;
else if (*optend == '0' ||
- !my_strcasecmp(&my_charset_latin1, optend, "false"))
+ !my_strcasecmp(&my_charset_latin1, optend, "false") ||
+ !my_strcasecmp(&my_charset_latin1, optend, "off"))
*((my_bool*) value)= (my_bool) 0;
else
{