Bug #56264 Command-line options are case-sensitive but don't throw errors
Submitted: 25 Aug 2010 17:41 Modified: 26 Aug 2010 4:53
Reporter: Baron Schwartz (Basic Quality Contributor) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.1.47, 5.1.51-bzr OS:Linux
Assigned to: CPU Architecture:Any
Tags: qc, regression

[25 Aug 2010 17:41] Baron Schwartz
When passing command-line options to mysqld, lettercase seems to be important.


is ignored silently, but this works:


This is a problem because it'll cause users to think they've configured the server, but in reality their configuration changes are being ignored.

How to repeat:
Start mysqld with an option that has the wrong lettercase, e.g.

$ /usr/libexec/mysqld --bulk-insert-Buffer-size=16G --help --verbose | grep bulk.insert

When I do this, I see no error or warning message, but the buffer has its default size.  When I lowercase the B in Buffer, it works and the buffer size is changed.

This seems to be different from the behavior on 5.0:

$ /usr/libexec/mysqld --bulk-insert-Buffer-size=16G --help --verbose
100825 12:22:33 [ERROR] /usr/libexec/mysqld: unknown variable 'bulk-insert-Buffer-size=16G'

Suggested fix:
The option-parsing already has lots of traps -- make it as strict as possible without breaking backwards compatibility.
[26 Aug 2010 4:53] Valeriy Kravchuk
Verified with current mysql-5.1 tree:

macbook-pro:5.0 openxs$  libexec/mysqld --bulk-insert-Buffer-size=16G --help --verbose | grep bulk.insert
100826  7:51:00 [ERROR] libexec/mysqld: unknown variable 'bulk-insert-Buffer-size=16G'
macbook-pro:5.0 openxs$ cd ../5.1
macbook-pro:5.1 openxs$  libexec/mysqld --bulk-insert-Buffer-size=16G --help --verbose | grep bulk.insert
100826  7:51:13 [Warning] Setting lower_case_table_names=2 because file system for /Users/openxs/dbs/5.1/var/ is case insensitive
100826  7:51:13 [Note] Plugin 'FEDERATED' is disabled.
100826  7:51:13 [Note] Plugin 'ndbcluster' is disabled.
                      Size of tree cache used in bulk insert optimization. Note
bulk_insert_buffer_size           8388608