Bug #53374 Don't delete temporary perl file if perl fails
Submitted: 3 May 2010 13:50 Modified: 14 Oct 2010 14:54
Reporter: Jørgen Austvik Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any

[3 May 2010 13:50] Jørgen Austvik
Description:
When embedded perl in MTR die, you get output like:

CURRENT_TEST: ndb.smoke
Bareword found where operator expected at /devel/mysql/install/5.1-telco-6.3-bigmem/mysql-test/var/tmp5laGPS line 6, near "--let"
        (Missing operator before let?)
Bareword found where operator expected at /devel/mysql/install/5.1-telco-6.3-bigmem/mysql-test/var/tmp5laGPS line 8, near "--let"
        (Missing operator before let?)
Bareword found where operator expected at /devel/mysql/install/5.1-telco-6.3-bigmem/mysql-test/var/tmp5laGPS line 10, near "--let"
        (Missing operator before let?)

But the temporary file is deleted:

[ja155679@khepri02:mysql-test] cat /devel/mysql/install/5.1-telco-6.3-bigmem/mysql-test/var/tmp5laGPS   
cat: cannot open /devel/mysql/install/5.1-telco-6.3-bigmem/mysql-test/var/tmp5laGPS: No such file or directory

I propose we don't delete the temporary file if perl fails, so that it is easier to debug the problem.

How to repeat:
In test file:

--perl
something that doesn't compile in perl
--EOF

Get perl error output, and let test fail, but don't get access to the temp file that perl ran.

Suggested fix:
Don't delete the temporary file if perl fails, so that it is easier to debug the problem.
[7 Jun 2010 11:32] 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:

  http://lists.mysql.com/commits/110342

2911 Bjorn Munch	2010-06-07
      Bug #53374 Don't delete temporary perl file if perl fails
      Simple condition on the delete stmt
      But NB: next mtr run will clean up and remove the temp file
[15 Jun 2010 11:09] Bjørn Munch
Pushed to 5.1-mtr, trunk-mtr, next-mr-mtr
[16 Aug 2010 6:29] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@sun.com-20100816062701-qo9dpnk5tkt1pksb) (version source revid:alik@sun.com-20100816062603-xc16eftmv7rmktyq) (merge vers: 5.6.1-m4) (pib:20)
[16 Aug 2010 6:39] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100816062819-bluwgdq8q4xysmlg) (version source revid:alik@sun.com-20100816062612-enatdwnv809iw3s9) (pib:20)
[16 Aug 2010 17:02] Paul DuBois
Test suite changes. No changelog entry needed.
[28 Sep 2010 8:46] Bugs System
Pushed into mysql-5.1 5.1.52 (revid:sunanda.menon@sun.com-20100928083322-wangbv97uobu7g66) (version source revid:sunanda.menon@sun.com-20100928083322-wangbv97uobu7g66) (merge vers: 5.1.52) (pib:21)
[14 Oct 2010 8:36] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (version source revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (merge vers: 5.1.51-ndb-7.0.20) (pib:21)
[14 Oct 2010 8:51] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.39 (revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (version source revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (merge vers: 5.1.51-ndb-6.3.39) (pib:21)
[14 Oct 2010 9:06] Bugs System
Pushed into mysql-5.1-telco-6.2 5.1.51-ndb-6.2.19 (revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (version source revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (merge vers: 5.1.51-ndb-6.2.19) (pib:21)
[14 Oct 2010 14:54] Jon Stephens
Testing only. Closed.