Bug #58515 Tests: use exec echo, not write_file to write mysqld.1.expect
Submitted: 26 Nov 2010 11:42 Modified: 20 Dec 2010 3:07
Reporter: Bjørn Munch Email Updates:
Status: Closed Impact on me:
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.1+ OS:Windows
Assigned to: Bjørn Munch CPU Architecture:Any

[26 Nov 2010 11:42] Bjørn Munch
Some tests fail on Windows when running --parallel which messages like:

mysqltest: At line 73: File already exist: 'G:/pb2/test/sb_1-2578259-1290607832.25/mysql-5.6.1-m5-win-x86-test/mysql-test/var-rpl_binlog_row/4/tmp/mysqld.1.expect'

What happens here is that the same file had just been used to restart the server. mtr then unlinks the file, but apparently, under heavy load Windows cannot be trusted to have removed it until we try to write to it again.

How to repeat:
Seen several places in PB.

Suggested fix:
Use exec echo instead of write_file; this will succeed whether or not the file already exists.

This should at least be done in tests that write to this file more than once, and in include/restart_mysqld.inc which some use.
[26 Nov 2010 13:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


2955 Bjorn Munch	2010-11-26
      Bug #58515 Tests: use use exec echo, not write_file to write mysqld.1.expect
      Fixed as suggested in the .inc file and two tests
      Could not reproduce problem, but tested tests on Windows
[26 Nov 2010 13:43] Bjørn Munch
Pushed to -mtr branches
[5 Dec 2010 12:42] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (version source revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (merge vers: 5.6.1) (pib:23)
[7 Dec 2010 12:55] Paul DuBois
Changes to test suite. No changelog entry needed.
[17 Dec 2010 12:48] Bugs System
Pushed into mysql-5.1 5.1.55 (revid:georgi.kodinov@oracle.com-20101217124435-9imm43geck5u55qw) (version source revid:mats.kindahl@oracle.com-20101201193331-1c07sjno2g7m46ix) (merge vers: 5.1.55) (pib:24)
[17 Dec 2010 12:51] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:georgi.kodinov@oracle.com-20101217124733-p1ivu6higouawv8l) (version source revid:bjorn.munch@oracle.com-20101127105217-ngg48wiwnfra2ik3) (merge vers: 5.5.8) (pib:24)