Bug #58961 General log does not get automatically recreated when deleted
Submitted: 16 Dec 2010 4:28 Modified: 13 Jan 2011 1:45
Reporter: Roel Van de Paar Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.5.8, 5.0, 5.1, 4.1 OS:Any (MS Windows, all)
Assigned to: Davi Arnaut CPU Architecture:Any

[16 Dec 2010 4:28] Roel Van de Paar
Description:
The general log does not get automatically recreated when it is deleted. Found on Windows, but may affect other os'es.

How to repeat:
Take a running server with general log configured. Run some queries. Delete the general log. Run some more queries. File does not get re-created automatically. Even creating a new empty file does not re-instate logging.
[16 Dec 2010 4:30] Roel Van de Paar
Restarting mysqld re-creates log file.
[16 Dec 2010 12:54] Sveta Smirnova
Thank you for the report.

Verified as described.
[13 Jan 2011 1:45] Davi Arnaut
Initially, the removal process just dissociates a file with its pathname. The actual removal of the file contents only happens after all references to the file are closed. Writes and reads will succeed even thought the file has no associated pathname.

In order to implement this, the server would have to check, at every write, whether the pathname still exists. This is a expensive operation and would further slow down logging. There are other alternatives, but none are worth considering in light of the maintenance burden. Closing as Won't Fix.