Changed some startup warnings to notes

- Changed 'WARNING' of type "You need to use --log-bin to make ... work"
  to 'Note'
- Only print startup Notes if log_warnings >= 4
This commit is contained in:
Monty 2022-11-28 15:02:34 +02:00 committed by Sergei Petrunia
parent 0bab548137
commit 02f6ba571e
2 changed files with 10 additions and 9 deletions
mysql-test/suite/binlog/t
sql

View file

@ -0,0 +1 @@
--log-warnings=4

View file

@ -5004,12 +5004,12 @@ static int init_server_components()
/* need to configure logging before initializing storage engines */
if (!opt_bin_log_used && !WSREP_ON)
{
if (opt_log_slave_updates && (global_system_variables.log_warnings > 1))
sql_print_warning("You need to use --log-bin to make "
"--log-slave-updates work.");
if (binlog_format_used && (global_system_variables.log_warnings > 1))
sql_print_warning("You need to use --log-bin to make "
"--binlog-format work.");
if (opt_log_slave_updates && (global_system_variables.log_warnings >= 4))
sql_print_information("You need to use --log-bin to make "
"--log-slave-updates work.");
if (binlog_format_used && (global_system_variables.log_warnings >= 4))
sql_print_information("You need to use --log-bin to make "
"--binlog-format work.");
}
/* Check that we have not let the format to unspecified at this point */
@ -5497,9 +5497,9 @@ static int init_server_components()
}
else
{
if (binlog_expire_logs_seconds && (global_system_variables.log_warnings > 1))
sql_print_warning("You need to use --log-bin to make --expire-logs-days "
"or --binlog-expire-logs-seconds work.");
if (binlog_expire_logs_seconds && (global_system_variables.log_warnings >= 4))
sql_print_information("You need to use --log-bin to make --expire-logs-days "
"or --binlog-expire-logs-seconds work.");
}
#endif