Bug #46540 When we stop the MySQL Service all logs are deleted
Submitted: 4 Aug 2009 11:11 Modified: 6 Sep 2009 20:10
Reporter: Bruno Peraudeau Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Logging Severity:S2 (Serious)
Version:5.0.67 OS:Windows
Assigned to: CPU Architecture:Any

[4 Aug 2009 11:11] Bruno Peraudeau
Description:
It's about these log files of MySQL :

log=D:/logs/mysql/query.log
log-error=D:/logs/mysql/error.log
log-slow-queries=D:/logs/mysql/slow.log

Sometimes, we can't copy these log files, when the service MySQL is running. For example, slow.log had a size of 15 Mb and it was impossible to copy. We have a message which said that a process prevent this file to be copied.
So it was necessary to stop MySQL service before copy it. But when we do that, this 3 log files are deleted.

It's a big problem for our client.

How could we copy these log files easily ?

Regards

Bruno Peraudeau

How to repeat:
I don't know how it come. Maybe, you have already seen this issue before.

regards

Bruno Peraudeau

Suggested fix:
Do you think if we upgrade our version to 5.0.84 it will fix this issue ?
Maybe it's necessary to configure something to avoid this issue ?
[4 Aug 2009 11:16] Valeriy Kravchuk
Thank you for the problem report. Please, send your my.ini file content.
[4 Aug 2009 11:47] Valeriy Kravchuk
As for general and slow query logs, you should be able to rename them any time. Check http://dev.mysql.com/doc/refman/5.0/en/log-file-maintenance.html. For error log this is not possible, but had you tried to execute FLUSH LOGS when you need to rename logs?

I had not found any known bugs in 5.0.67 that may lead to the problem you described.

In any case, please, send the results of dir DOS command for the D:/logs/mysql directory before you stop service and immediately after that.
[5 Aug 2009 8:36] Bruno Peraudeau
Here is the result of DIR DOS Command during the different states

Attachment: TestResults.doc (application/msword, text), 156.50 KiB.

[5 Aug 2009 8:41] Bruno Peraudeau
Good morning,

as you can see on the attached file, after the restarting of MySQL Service, we can copy the log files. But before, it was impossible. And you can see, during the restarting, MySQL delete log files to create again it.

Thanks for your help.

Regards

Bruno Peraudeau
[5 Aug 2009 14:01] MySQL Verification Team
Thank you for the feedback. Which Windows OS version are you running? I couldn't repeat this on Vista Home Premium, I mean I don't have deleted the files when stop/start the service.
[5 Aug 2009 14:30] Bruno Peraudeau
You're welcome. Thank you for your help :)

You know this bug arrive only after few hours or maybe when the size of log files exceed a certain level. We don't know exactly. To answer your question, the OS version of this server is : Windows Server 2003 SP2

Regards

Bruno Peraudeau
[6 Aug 2009 7:02] Valeriy Kravchuk
Can you try to check with a newer version, 5.0.84? I am also not able to repeat this (logs disappearing) on XP with newer versions. So, while I can not identify, yet, any known bug that may explain the difference, I'd still would like to know if upgrade solves the problem.
[6 Aug 2009 9:22] Bruno Peraudeau
Good morning,

I'm going to see with my client if I can easily upgrade this version of MySQL to 5.0.84.

I will send you an answer of the results ASAP.

Regards.

Bruno Peraudeau
[6 Aug 2009 20:10] Valeriy Kravchuk
Please, inform about any results with 5.0.84.
[6 Sep 2009 23: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".