Commit ec4f1d19 authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-6313 - mysqld --log-bin=no-such-dir/master crashes during

            server initialization

ER() macro was used during server initialization. It refers to
current_thd, which is not available that early.

Print error to error log in "lc-messages" locale.
Avoid duplicate error message during server initialization.
parent 3375e137
......@@ -2523,9 +2523,10 @@ int MYSQL_LOG::generate_new_name(char *new_name, const char *log_name)
{
if (find_uniq_filename(new_name))
{
my_printf_error(ER_NO_UNIQUE_LOGFILE, ER(ER_NO_UNIQUE_LOGFILE),
MYF(ME_FATALERROR), log_name);
sql_print_error(ER(ER_NO_UNIQUE_LOGFILE), log_name);
if (current_thd)
my_printf_error(ER_NO_UNIQUE_LOGFILE, ER(ER_NO_UNIQUE_LOGFILE),
MYF(ME_FATALERROR), log_name);
sql_print_error(ER_DEFAULT(ER_NO_UNIQUE_LOGFILE), log_name);
return 1;
}
}
......
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