Commit 3758c92b authored by unknown's avatar unknown

Use on Unix hostname.err only when --log-error=path.

Asked by Heikki and Peter.


sql/mysqld.cc:
  Use on Unix hostname.err only when --log-error=path.
parent a29d8507
......@@ -2214,6 +2214,7 @@ int main(int argc, char **argv)
{
if (log_error_file_ptr != log_error_file)
strmake(log_error_file, log_error_file_ptr, sizeof(log_error_file));
#ifdef __WIN__
else
{
char *end;
......@@ -2224,6 +2225,7 @@ int main(int argc, char **argv)
*strxnmov(end, sizeof(log_error_file)-length-1,
glob_hostname, ".err", NullS)= 0;
}
#endif
if (log_error_file[0] != 0)
if (freopen(log_error_file, "a+", stdout))
freopen(log_error_file, "a+", stderr);
......
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