Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Not a Bug
-
Affects Version/s: 5.5.32
-
Fix Version/s: None
-
Component/s: None
-
Labels:
-
Environment:Linux, Fedora
Description
I'm on Fedora and try to get verbose help as root:
sudo /usr/libexec/mysqld --help --verbose
It kinda works but the exit code is 1, which is not what I'd expect, since I wanted just help message.
How to repeat:
su - /usr/libexec/mysqld --help --verbose echo $?
Actual result:
1
Expected result:
0
Reported also on http://bugs.mysql.com/bug.php?id=70058
Proposed patch is attached.
Gliffy Diagrams
Attachments
Issue Links
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
I'm not sure it's a good idea. If you run "mysqld --help" you will get the exit code 0. But "mysqld --help --verbose" prints values of all variables and command-line options. To do that it reads config files and load plugins (but doesn't run them). If something will fail during this process, it'll exit with the code 1. It means that if you start the server exactly the same way — it'll fail, it won't start. And if you start the server differently — your help output was misleading, it contained different values or even a different set of options as compared to what your running server would have. This is what the exit code means — you should not trust this help output, it is not what your server will have.