Bug #43826 Server error log not saved when a test fails
Submitted: 24 Mar 2009 9:34 Modified: 24 Mar 2009 10:10
Reporter: Rafal Somla Email Updates:
Status: Duplicate Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[24 Mar 2009 9:34] Rafal Somla
Description:
When test fails in MTR the state at the failure time is saved in var/log/suite.test/ dir. However, the error log of the server, mysqld.N.err, as it was at the time of failure is not saved there. This is a serious obstacle for investigating the failure. Note that when server is restarted by MTR, its error log will be overwritten and the valuable information from the time of failure will be lost.

How to repeat:
Run a test which fails under MTR - look at saved state in the var/log/ dir.

Suggested fix:
Copy server's error log to var/log/suite/test/mysqld.N/ directory
[24 Mar 2009 9:44] Bjørn Munch
The overwriting of log when MTR restarts the server has been fixed in Bug #40978, so the server log should now be available in var/log/mysqld.N.err also after a test failire.
[24 Mar 2009 10:10] Sveta Smirnova
Thank you for the report.

Closed as duplicate of bug #40978, because previous comment.
[24 Mar 2009 10:46] Rafal Somla
Ok, but I still think it would be useful to have a copy of server log from the exact time of test failure. If nothing else, it will help by having the info related to the failure listed at the end of the log, instead of being in the middle of a long, common log.