Bug #25919 mysqladmin flush-logs does not allocate a new filehandle for MySQL error log
Submitted: 29 Jan 2007 16:00 Modified: 28 Feb 2007 18:26
Reporter: Sebastian Nohn Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.0.18-standard-log OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[29 Jan 2007 16:00] Sebastian Nohn
Description:
There is a logrotate job on MySQLServerA which rotated MySQLServerA.err to
MySQLServerA .err.1 and afterwards compress logfile (gzip)

Due to that, the filehandle on the error log is lost:

[root@MySQLServerA logrotate.d]# lsof -p 1357 | grep deleted | grep err
mysqld  1357 mysql    1w   REG        8,2     2022510  8061541
/usr/local/mysql-standard-5.0.18-linux-i686-glibc23/data/MySQLServerA.err.1
(deleted)
mysqld  1357 mysql    2w   REG        8,2     2022510  8061541
/usr/local/mysql-standard-5.0.18-linux-i686-glibc23/data/MySQLServerA.err.1
(deleted)

mysqladmin flush-logs does not allocate a new one:

[root@MySQLServerA logrotate.d]# mysqladmin flush-logs

[root@MySQLServerA logrotate.d]# lsof -p 1357 | grep deleted | grep err
mysqld  1357 mysql    1w   REG        8,2     2022510  8061541
/usr/local/mysql-standard-5.0.18-linux-i686-glibc23/data/MySQLServerA.err.1
(deleted)
mysqld  1357 mysql    2w   REG        8,2     2022510  8061541
/usr/local/mysql-standard-5.0.18-linux-i686-glibc23/data/MySQLServerA.err.1
(deleted)

How to repeat:
- Enable error logging
- Trigger errors
- Rotate the log away (using compression)
- mysqladmin flush-logs
- Trigger errors

=> File handle not re-allocated => new errors do not get logged
[29 Jan 2007 18:26] Sveta Smirnova
Thank you for the report.

Please try using current 5.0.33 or 5.0.27 version and say us result.
[1 Mar 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".