Bug #18979 Bad Regular Expression in mysql-test-run.pl (via mysql-test/lib/mtr_cases.pl)
Submitted: 10 Apr 2006 18:55 Modified: 3 Jul 2006 19:06
Reporter: Ian Greenhoe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0.19 OS:Linux (Linux/Debian(Etch))
Assigned to: Ian Greenhoe CPU Architecture:Any

[10 Apr 2006 18:55] Ian Greenhoe
Description:
Bad re in  mysql-test/lib/mtr_cases.pl, line 119

if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )

This prevents lines like the following from causing us heartache on windows platforms:
mytest_to_ignore:colon:in:explanation: causing problems

This should be parsed as having the test name "mytest" and explanation "colon:in:explanation causing problems", instead it gets "mytest:colon:in" and "explanation causing problems".

Also, in the case that you have:
mytest_to_ignore2:word this is an expression that requires backtracking

Will require backtracking thru the entire string.

How to repeat:

Put the following lines in disabled.def

mytest_to_ignore:colon:in:explanation: causing problems
mytest_to_ignore2:word! this is an expression that requires backtracking

Create two tests that deliberately fail (named mytest_to_ignore and mytest_to_ignore2), and run the mysql-test-run.pl script on them.  They should be ignored, but will not.

Suggested fix:
if ( /^\s*([^\s:]+)\s*:\s*(.*?)\s*$/ )
[18 Apr 2006 2:44] 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/5040
[19 Apr 2006 7:56] Magnus BlÄudd
Ok to push.
[28 Jun 2006 16:03] Ian Greenhoe
In 5.0.23
[28 Jun 2006 16:03] Ian Greenhoe
In 5.0.23
[28 Jun 2006 16:13] Ian Greenhoe
In 5.0.23
[3 Jul 2006 19:06] Paul DuBois
Change to test program only.
No changelog entry needed.