Bug #54368 MTR does not recognize carriage return in --defaults-file
Submitted: 9 Jun 2010 13:59 Modified: 15 Oct 2010 10:41
Reporter: Elena Stepanova Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.1, 5.5 OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any

[9 Jun 2010 13:59] Elena Stepanova
Description:
On Linux or Solaris, if config file provided via --defaults-file option has \r\n as EOL sequence, MTR fails to start server with the following uninformative message:

==============================================================================

TEST                                      RESULT   TIME (ms)
------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
' found in '/tmp/my_test.cnf' at lib/My/ConfigFactory.pm line 607

Only  28  of 496 completed.
mysql-test-run: *** ERROR: Not all tests completed

How to repeat:
Create a config file with Windows-like ends-of-line.
Run
perl mysql-test-run.pl <your config file> --start

Suggested fix:
Handle \r\n and \n as valid EOL symbols 
(maybe \r as well, not sure how it works on MacOS)
[14 Jun 2010 13:36] 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/111030

2911 Bjorn Munch	2010-06-14
      Bug #54368 MTR does not recognize carriage return in --defaults-file
      Remove any leftover trailing ^M from lines read in
[14 Jun 2010 13:41] Bjørn Munch
The message written is intended to be informative, but the start "Unexpected line '" is overwritten because the unexpected line is a CR. :-)
[15 Jun 2010 11:11] Bjørn Munch
Pushed to 5.1-mtr, trunk-mtr, next-mr-mtr
[16 Aug 2010 6:30] 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:38] 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:03] Paul DuBois
Test suite changes. No changelog entry needed.
[28 Sep 2010 8:48] 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:35] 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:50] 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)
[15 Oct 2010 10:41] Jon Stephens
Setting back to Closed; see above.