Bug #4997 --log-error sometimes generates incorrect default name
Submitted: 11 Aug 2004 18:31 Modified: 12 Aug 2004 21:55
Reporter: Paul Dubois Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.X OS:Unix (only?)
Assigned to: Ingo Strüwing CPU Architecture:Any

[11 Aug 2004 18:31] Paul Dubois
Description:
Date: Wed, 11 Aug 2004 10:49:46 -0500
To: Ingo Strüwing <ingo@mysql.com>
From: Paul DuBois <paul@mysql.com>
Subject: Re: server --log-error option
Cc: dev-public@mysql.com

At 17:14 +0200 8/11/04, Ingo Strüwing wrote:
Hi Paul,

Am Mi, den 11.08.2004 schrieb Paul DuBois um 16:49:
...
 However, if I start the server directory (not with mysqld_safe) and
 specify --log-error with no file name, the filename that actually
 is used is host_name, not host_name.err.

I always find a file host_name.err. And I always start mysqld directly
(without a script). Not sure if this is true for all versions
whatsoever. But I never saw an error log file without .err.

Hm!

Okay, I saw the behavior on two systems, but prompted by your observation,
I did some further checking and was able to repeat what you saw on a third
system.  So now I believe I know what causes the behavior:

- If hostname returns a name with dots, --log-error results in
an error log of the hostname only.
- If hostname does not return a name with dots, --log-error results
in an error log with the .err suffix.

I can produce both behaviors on a single machine by using the "hostname"
command to set the hostname.

Example:

"hostname ice.snake.net"  Result: --log-error produces "ice.snake.net"
"hostname ice"            Result: --log-error produces "ice.err"

-- 
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

How to repeat:
See description above.
[11 Aug 2004 19:40] Ingo Strüwing
Fixed this in Version 4.0.21.
A domain name part of the hostname is now stripped off and replaced by '.err'.
A host name without domain name part gets '.err' appended.
WARNING: This changes behaviour (even if old behaviour was unexpected).
[12 Aug 2004 21:55] Ingo Strüwing
fixed in 4.1.4.