Bug #2587 Structured var instance names not handled like other options
Submitted: 30 Jan 2004 12:12 Modified: 31 Mar 2004 0:20
Reporter: Paul DuBois Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:Any (All)
Assigned to: Sergei Glukhov CPU Architecture:Any

[30 Jan 2004 12:12] Paul DuBois
Description:
Many variables have underscores in the names.
There is a convention that you can assign
values to such variables with a command-line
option using either underscores *or* dashes.
For example, these are equivalent options for
setting the back_log variable:

[mysqld]
back_log=50
back-log=50

This convention is implemented only partially
for structured variables.  Both of these setting
work, where dashes appear in the component name:

[mysqld]
hot_cache.key_buffer_size=1M
hot_cache.key-buffer-size=1M

But dashes in the instance name do not work.
Only the first of the following settings works:

[mysqld]
hot_cache.key_buffer_size=1M
hot-cache.key_buffer_size=1M

In the second case, I don't know what the server
actually does with it.  Apparently the server
doesn't think it's an error, because I don't see
any message in the .err file.)  Unfortunately,
I don't think there is any syntax one can use
to refer to the variable in a SQL statement?

It appears that there isn't much checking on
legal instance names when they appear as command
options. For example, even a line like this does
not trigger an error in the .err file:

[mysqld]
hot*cache.key_buffer_size=1M

How to repeat:
See above

Suggested fix:
Suggested fix: Treat instance names in command
options the same way as component names before
assigning values: convert dashes to underscores.
[31 Mar 2004 0:20] Sergei Glukhov
Looks like It's not a bug. If we use 'hot-cache.key_buffer_size=1M' in my.cnf, mysqld creates new key cache variable with name 'hot-cache'. And we can use it(select @@`hot-cache`.key_buffer_size). The same for 'hot*cache'.