Bug #59813 log-file variables return values when logs are not enabled
Submitted: 29 Jan 2011 21:40 Modified: 30 Jan 2011 8:00
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.1.54 OS:Windows
Assigned to: Davi Arnaut CPU Architecture:Any

[29 Jan 2011 21:40] Peter Laursen
Description:
Even if no general log and/or slow log is enabled 'slow_query_log_file' and 'general_log_file' return a value.

How to repeat:
SHOW GLOBAL VARIABLES  LIKE 'general_log_file';
--  C:\ProgramData\MySQL\MySQL Server 5.1\Data\Peter-Pc.log

SHOW GLOBAL VARIABLES  LIKE 'slow_query_log_file';
C:\ProgramData\MySQL\MySQL SERVER 5.1\DATA\Peter-Pc-slow.log

..

C:\ProgramData\MySQL\MySQL Server 5.1\data>dir
-- no such files

Suggested fix:
It should return DISABLED/NO/NULL.
[29 Jan 2011 22:32] Peter Laursen
What is even worse is that the returns from the statements may point to existing files that are non-valid and|or discontinued log files.
[29 Jan 2011 23:16] Peter Laursen
OK .. setting down to S3.  "slow_query_log" and "log" variables are OFF (after all). So they can be queried.

But I still think that the log file variables should return DISABLED - as "log_output" should (it returns FILE)
[30 Jan 2011 8:00] Davi Arnaut
Not a bug, it works as documented and as one would expect.