Bug #30025 Mysqld prints out warnings/errors being run with --no-defaults --help
Submitted: 25 Jul 2007 9:40 Modified: 16 Nov 2010 2:08
Reporter: Alexander Nozdrin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.1 OS:Any
Assigned to: Alexey Botchkov CPU Architecture:Any
Tags: regression

[25 Jul 2007 9:40] Alexander Nozdrin
Description:
In 5.0 mysqld used to print out brief information when ran with
--no-defaults --help.

In 5.1 it also prints out warnings and errors.

How to repeat:
> ./mysqld  --no-defaults --help
070725 13:35:59 [ERROR] Can't find messagefile '/usr/local/mysql/share/mysql/english/errmsg.sys'
070725 13:35:59 [Warning] Can't create test file /usr/local/mysql/var/ibm.lower-test
070725 13:35:59 [Warning] Can't create test file /usr/local/mysql/var/ibm.lower-test
./mysqld: Can't change dir to '/usr/local/mysql/var/' (Errcode: 2)
./mysqld: Unknown error 1146
070725 13:35:59 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
./mysqld  Ver 5.1.21-beta-debug for suse-linux-gnu on i686 (Source distribution)
Copyright (C) 2000 MySQL AB, by Monty and others
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Starts the MySQL database server

Usage: ./mysqld [OPTIONS]

For more help options (several pages), use mysqld --verbose --help

070725 13:35:59 [Note]

--------------------------------------------------------------------

> ./mysqld  --no-defaults --help
./mysqld  Ver 5.0.48-debug for suse-linux-gnu on i686 (Source distribution)
Copyright (C) 2000 MySQL AB, by Monty and others
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Starts the MySQL database server

Usage: ./mysqld [OPTIONS]

For more help options (several pages), use mysqld --verbose --help
[25 Jul 2007 10:16] Sveta Smirnova
Thank you for the report.

Verified as described.
[25 Jul 2007 10:18] Sveta Smirnova
Can be related (or duplicate) to bug #29854
[25 May 2010 16:29] Sveta Smirnova
See also bugs ## 29854, 28417, 31106. They are similar and probably can be solved at the same time.
[20 Jun 2010 17:50] 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/111644

3249 Alexey Botchkov	2010-06-19
      Bug#30025 Mysqld prints out warnings/errors being run with --no-defaults --help 
              getting the complete help requires some initialization like plugin
              installing now. That process can possibly lead to errors. I just suppressed
              all the error messages when --help was specified.
      
      per-file comments:
        libmysqld/lib_sql.cc
      Bug#30025 Mysqld prints out warnings/errors being run with --no-defaults --help 
              set error_handler_hook earlier.
      
        sql/init.cc
      Bug#30025 Mysqld prints out warnings/errors being run with --no-defaults --help 
              no need to set the error_handler_hook here as it's already specified.
      
        sql/mysqld.cc
      Bug#30025 Mysqld prints out warnings/errors being run with --no-defaults --help 
              suppress error messages if the opt_help is set.
[26 Aug 2010 21:04] Marc ALFF
See duplicate bug#28417
[10 Sep 2010 13:56] 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/118005

3207 Alexey Botchkov	2010-09-09
      Bug#30025 Mysqld prints out warnings/errors being run with --no-defaults --help
              now do no initializations for the --help.
              Do it for --verbose --help though.
      
      per-file comments:
        sql/mysqld.cc
      Bug#30025 Mysqld prints out warnings/errors being run with --no-defaults --help
              quit with the help message at once as --help was given
[10 Sep 2010 14:01] Alexey Botchkov
After some discussion decided to fix this in the simpler way - only suppress the errors for '--help' and isuue them if '--help --verbose'. Seems that keeps everybody happy.
[14 Sep 2010 22:55] Sveta Smirnova
See also bug #30970. Please also fix --version output as well.
[28 Sep 2010 8:01] Alexey Botchkov
--help and --version for the client's tools aren't fixed with this patch and left for the #30970. That bug should be fixed separately, and it's fix postponed to 5.7.
[8 Oct 2010 8:14] 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/120344

3220 Alexey Botchkov	2010-10-08
      Bug#30025 Mysqld prints out warnings/errors being run with --no-defaults --help
              now do no initializations for the --help.
              Do it for --verbose --help though.
      
      per-file comments:
        sql/mysqld.cc
      Bug#30025 Mysqld prints out warnings/errors being run with --no-defaults --help
              quit with the help message at once as --help was given
[8 Oct 2010 8:35] Alexey Botchkov
pushed into mysql-5.5-bugteam.
[9 Nov 2010 19:48] Bugs System
Pushed into mysql-5.5 5.5.7-rc (revid:sunanda.menon@sun.com-20101109182959-otkxq8vo2dcd13la) (version source revid:sunanda.menon@sun.com-20101109182959-otkxq8vo2dcd13la) (merge vers: 5.5.7-rc) (pib:21)
[13 Nov 2010 16:09] Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:alexander.nozdrin@oracle.com-20101113152450-2zzcm50e7i4j35v7) (merge vers: 5.6.1-m4) (pib:21)
[13 Nov 2010 16:33] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101113160336-atmtmfb3mzm4pz4i) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (pib:21)
[16 Nov 2010 2:08] Paul DuBois
Noted in 5.5.7 changelog.

When invoked to display a help message, mysqld also displayed
spurious warning or error messages.