Bug #58608 mysqltestrun --help incongruences

Submitted: 1 Dec 2010 0:09 Modified: 20 Dec 2010 3:07
Reporter: Santo Leto Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.5-bzr OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any
Tags: --help, incongruences, mtr, mysqltestrun

[1 Dec 2010 0:09] Santo Leto
Description:
There are some incongruences between the actual command line options that the script allows and the output produced by the "--help" command.

In particular, in the source code of the script there is a note:

# Read the command line options
# Note: Keep list, and the order, in sync with usage at end of this file

but:

a) some options of the script are not included in the output of the "--help" command
b) order is not always respected

How to repeat:
mysqltestrun --help

Suggested fix:
As per point a):

These are the changes that we should consider to implement at the end of the file so that the output of the --help command would respect available command line options of the script:

1) ssl --> option is ssl|with-openssl . To include that with-openssl is a synonym of ssl
2) defaults_extra_file --> option is defaults-extra-file
3) skip-ndb --> option is skip-ndbcluster|skip-ndb . To include that skip-ndbcluster is a synonym of skip-ndb
4) start-from --> to include this option
5) skip-im --> to include this option
6) gprof  --> to include this option
7) timer --> to include this option
8) list-options --> to include this option
9) notimer --> to remove this option

Please also check this line of code when reading the command line options:

[...]
'strace-client:s'          => \$opt_strace_client,
[...]

Is it "strace-client:s" or "strace-client=s"?

As per point b):
I think this is less important. We could consider change the note

# Note: Keep list, and the order, in sync with usage at end of this file

with

# Note: Keep list in sync with usage at end of this file

or we could consider reordering options' list which is shown with the command "--help" so that options are listed in the same way as the script reads them with the %options=(...) command.
[1 Dec 2010 4:19] Valeriy Kravchuk
Thank you for the problem report.
[1 Dec 2010 13:03] Bjørn Munch
I did a clean-up here at some point but may have missed some details, and some options have been added later. I will have another look, thanks for pointing these out.

--skip-im is deprecated and is silently ignored, so should not be on the help.

I don't think it's really important to keep the order in sync.
[1 Dec 2010 15:34] 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/125672

2956 Bjorn Munch	2010-12-01
      Bug #58608 mysqltestrun --help incongruences
      Fixed some errors
      Added note about 'no' prefix to options
      See also follow-up comment to bug report
[1 Dec 2010 15:48] Bjørn Munch
Some comments about the list of issues:

1) with-openssl is likely an old variant which has been replaced (I can    probably dig in the logs and find out when). I think it makes sense to support it without documenting that fact in --help or in the user doc.
2) This was a mistake, has been corrected.
3) help says skip-ndb[cluster] to this is covered.
4) start-from is in the help text.
5) skip-im is deprecated and silently ignored, should not be listed in help.
6) gprof was missing, added
7) 9) I changed notimer to timer in help text and added a sentence about using 'no' option prefix.
8) list-options was added for some internal use, I don't want to remove it since I have no control over who might be using it now. I actually changed it so it would not list itself.

As for 'strace-client:s', that is correct as the option takes an optional argument.
[9 Dec 2010 13:41] 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/126421

2957 Bjorn Munch	2010-12-09
      Bug #58608 mysqltestrun --help incongruences
      Fixed some errors
      Added note about 'no' prefix to options
      See also follow-up comment to bug report
[9 Dec 2010 16:23] Bjørn Munch
Pushed to -mtr trees
[17 Dec 2010 12:49] Bugs System
Pushed into mysql-5.1 5.1.55 (revid:georgi.kodinov@oracle.com-20101217124435-9imm43geck5u55qw) (version source revid:bjorn.munch@oracle.com-20101209193247-7c4ob7wuy21clt42) (merge vers: 5.1.55) (pib:24)
[17 Dec 2010 12:53] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:georgi.kodinov@oracle.com-20101217124733-p1ivu6higouawv8l) (version source revid:bjorn.munch@oracle.com-20101209195322-embe21sfutgb3oy0) (merge vers: 5.5.8) (pib:24)
[17 Dec 2010 12:56] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:georgi.kodinov@oracle.com-20101217125013-y8pb3az32rtbplc9) (version source revid:anitha.gopi@sun.com-20101210041312-50t9adyhwwybsm6x) (merge vers: 5.6.1) (pib:24)
[20 Dec 2010 3:07] Paul DuBois
Changes to test suite. No changelog entry needed.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.063 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.