Commit e3e60a41 authored by Michael Widenius's avatar Michael Widenius

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
parent f1b2ecc4
......@@ -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
{
......
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment