Bug #20303 mysql-test-run.pl: Does not recognize -- argument.
Submitted: 6 Jun 2006 19:08 Modified: 9 Jun 2006 12:45
Reporter: Paul DuBois Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:4.1 and up OS:Any
Assigned to: Joerg Bruehe CPU Architecture:Any

[6 Jun 2006 19:08] Paul DuBois
Description:
The mysql-test-run shell script recognizes the -- argument
as meaning "stop processing arguments as options."  So,
for example, these two commands are the same:

./mysql-test-run test_name
./mysql-test-run -- test_name

However, the mysql-test-run.pl Perl script does not recognize
the -- argument.  This command works:

./mysql-test-run.pl test_name

But this command results only in a usage message:

./mysql-test-run.pl -- test_name

How to repeat:
See above.

Suggested fix:
The issue occurs because of the use of "pass_through" in
the script. This causes -- to be left in @ARGV, so perhaps
the option processing code needs to look for that and remove
it if it's present.
[6 Jun 2006 19:12] Joerg Bruehe
"pass_through" got added on 2005-Sep-28, check the release in which that appears, start fixing there.

<kent|holiday> joerg: When you are at it, could you fix so it prints out the option that is invalid. 
           Must be a way described on "perldoc Getopt::Long".
<paul> Yes, right now there is no error message at all. Just the usage message.
[8 Jun 2006 10:50] Joerg Bruehe
Problem was introduced in 4.1, will start the fix there.
[8 Jun 2006 12:52] 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/7390
[8 Jun 2006 17:55] 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/7411
[9 Jun 2006 12:45] Joerg Bruehe
Fix is pushed to 4.1.21, 5.0.23, and 5.1.12-beta.

IMO, no need to document, so I close this directly.