Commit 6b8efdf4 authored by unknown's avatar unknown

Bug#17599 The server doesn't give a warning

when --log is specified but log table is used
(recommit after docs reviewed the text of warnings)


sql/mysqld.cc:
  add warnings if the filename was specified for --log
  or --log-slow-queries options, while the log tables are used
parent 2b7227c1
......@@ -2770,6 +2770,19 @@ static int init_common_variables(const char *conf_file_name, int argc,
else
sys_init_slave.value=my_strdup("",MYF(0));
/* check log options and issue warnings if needed */
if (opt_log && opt_logname && !(log_output_options & LOG_FILE) &&
!(log_output_options & LOG_NONE))
sql_print_warning("Although a path was specified for the "
"--log option, log tables are used. "
"To enable logging to file use the --log-output option.");
if (opt_slow_log && opt_slow_logname && !(log_output_options & LOG_FILE)
&& !(log_output_options & LOG_NONE))
sql_print_warning("Although a path was specified for the "
"--log-slow-queries option, log tables are used. "
"To enable logging to file use the --log-output option.");
if (!opt_logname)
opt_logname= make_default_log_name(buff, ".log");
sys_var_general_log_path.value= my_strdup(opt_logname, MYF(0));
......
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