Bug #55873 short startup options do not work in 5.5
Submitted: 10 Aug 2010 8:07 Modified: 3 Oct 2010 1:34
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.5.5 OS:Windows
Assigned to: Marc ALFF CPU Architecture:Any
Tags: regression

[10 Aug 2010 8:07] Shane Bester
Description:
short startup options do not work in 5.5

[ERROR] Buffered error: mysqld: unknown option '-a'
[ERROR] Buffered error: mysqld: unknown option '-l'
[ERROR] Buffered error: mysqld: unknown option '-W'
[ERROR] Buffered error: mysqld: unknown option '-s'

5.1.49 worked fine.

How to repeat:
mysqld --no-defaults --console -a
mysqld --no-defaults --console -l
mysqld --no-defaults --console -W
mysqld --no-defaults --console -s
etc...

Suggested fix:
just remove the short versions of variables and i'll be happy
[10 Aug 2010 11:15] MySQL Verification Team
Thank you for the bug report. Verified on Fedora 13 X86_64:

[miguel@tikal dbs]$ 5.5/bin/mysqld --console -a
100810  8:12:00 [ERROR] Buffered error: 5.5/bin/mysqld: unknown option '-a'
[11 Aug 2010 17:02] 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/115515

3197 Marc Alff	2010-08-11
      Bug#55873 short startup options do not work in 5.5
      
      Before this fix, the server did not recognize 'short' (as in -a) options
      but only 'long' (as in --ansi) options in the startup command line.
      
      The root cause is that handle_options() did not honor the my_getopt_skip_unknown flag
      when parsing 'short' options.
      
      The fix changes handle_options(), so that my_getopt_skip_unknown is honored in all cases.
[25 Aug 2010 23:59] 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/116808

3194 Marc Alff	2010-08-25
      Bug#55873 short startup options do not work in 5.5
      
      Before this fix, the server did not recognize 'short' (as in -a)
      options but only 'long' (as in --ansi) options
      in the startup command line, due to earlier changes in 5.5
      introduced for the performance schema.
      
      The root cause is that handle_options() did not honor the
      my_getopt_skip_unknown flag when parsing 'short' options.
      
      The fix changes handle_options(), so that my_getopt_skip_unknown is
      honored in all cases.
      
      Note that there are limitations to this,
      see the added doxygen documentation in handle_options().
      
      The current usage of handle_options() by the server to
      parse early performance schema options fits within the limitations.
      This has been enforced by an assert for PARSE_EARLY options, for safety.
[26 Aug 2010 12:15] Guilhem Bichot
approved with minor non-critical comments sent by mail
[26 Aug 2010 14:30] Marc ALFF
Pushed into:
- mysql-5.5-bugfixing
- mysql-trunk-bugfixing
- mysql-next-mr-bugfixing
[30 Aug 2010 8:30] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@sun.com-20100830082732-n2eyijnv86exc5ci) (version source revid:alik@sun.com-20100830082732-n2eyijnv86exc5ci) (merge vers: 5.6.1-m4) (pib:21)
[30 Aug 2010 8:33] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100830082745-n6sh01wlwh3itasv) (version source revid:alik@sun.com-20100830082745-n6sh01wlwh3itasv) (pib:21)
[30 Aug 2010 8:36] Bugs System
Pushed into mysql-5.5 5.5.7-m3 (revid:alik@sun.com-20100830082727-5ac4czrxl61w9wle) (version source revid:alik@sun.com-20100830082727-5ac4czrxl61w9wle) (merge vers: 5.5.7-m3) (pib:21)
[2 Sep 2010 1:15] 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/117379

3201 Marc Alff	2010-09-01
      Bug#55873 short startup options do not work in 5.5
      
      Merge cleanup, fixed a build warning:
      
      my_getopt.c:156: warning: 'opt_found' may be used uninitialized in this function
[8 Sep 2010 1:56] Paul DuBois
Noted in 5.5.7, 5.6.1 changelogs.

Short (single-letter) command-line options did not work.
[2 Oct 2010 18:13] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alexander.nozdrin@oracle.com-20101002180948-852x1cuv7c6i85ea) (version source revid:alexander.nozdrin@oracle.com-20101002180857-an32jpuwzemsp4f2) (merge vers: 5.6.1-m4) (pib:21)
[2 Oct 2010 18:14] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101002181053-6iotvl26uurcoryp) (version source revid:alexander.nozdrin@oracle.com-20101002180917-h0n62akupm3z20nt) (pib:21)
[2 Oct 2010 18:16] Bugs System
Pushed into mysql-5.5 5.5.7-rc (revid:alexander.nozdrin@oracle.com-20101002180831-590ka2tuit9qoxbb) (version source revid:alexander.nozdrin@oracle.com-20101002180831-590ka2tuit9qoxbb) (merge vers: 5.5.7-rc) (pib:21)