summaryrefslogtreecommitdiff
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
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
-rw-r--r--mysys/my_getopt.c6
-rw-r--r--sql/mysqld.cc4
2 files changed, 6 insertions, 4 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
{
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 4e9116874d4..0377d965b16 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -6335,8 +6335,8 @@ struct my_option my_long_options[] =
&opt_debugging, &opt_debugging,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"general_log", OPT_GENERAL_LOG,
- "Enable/disable general log. Filename can be specified with --general-log-file or --log-basename. Is 'hostname.err' by default.",
- &opt_log, &opt_log, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
+ "Enable/disable general log. Filename can be specified with --general-log-file or --log-basename. Is 'hostname.log' by default.",
+ &opt_log, &opt_log, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_LARGE_PAGES
{"large-pages", OPT_ENABLE_LARGE_PAGES, "Enable support for large pages. "
"Disable with --skip-large-pages.", &opt_large_pages, &opt_large_pages,