Bug #55288 Use of the underscore or hyphen for variables and options is confusing
Submitted: 15 Jul 2010 14:35 Modified: 20 Jul 2010 4:54
Reporter: Roger Nay Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to:
Triage: Triaged: D5 (Feature request)

[15 Jul 2010 14:35] Roger Nay
Use of the underscore or hyphen for variables and options is confusing and not explained well or the particulars are not highlighted enough in the manual.

How to repeat:

Suggested fix:
Use only underscores ore hyphens for all option names (my.cnf, command line and server variables).

Maybe just document how simple it really is in the various sections. I'm not sure that table matrix format on the options pages makes it that obvious.
1) my.cnf and command line options you can use either '_' or '-' within the option name.
2) server variables are '_' only when working with the MySQL client (modifying from SET for example).

I'm not sure it is that simple, that is why the first suggested fix is probably better.
[15 Jul 2010 14:58] Simon Mudd
Well in the end having a UNIQUE way to configure variables and that the required values are shown and set the same way is something that I see as a good longterm goal.

It's not just about the fact that these variables can be used with hyphens sometimes or underscores sometimes.

As anyone or script or system that want to make changes to a running system needs to look at the config files (my.cnf) and also at the output from SHOW GLOBAL VARIABLES it's _so much easier_ if you only have to check for a single value and set the variable to the same single value in both cases.

Achieving the goal may take time and require warning people of the intended change but not doing so just gives everyone more work handling these inconsistencies.
[15 Jul 2010 15:00] Simon Mudd
That's why this issue needs a policy decision to make the change (or not if it's considered too [policitically] expensive) and assuming the decision is made to go ahead a revision of where the variables are used and how they are handled, possibly with a period of backwards compatibility with warnings....