Bug #40424 Writing --ndbcluster as --ndb_cluster in my.cnf gives weird results
Submitted: 30 Oct 2008 11:34 Modified: 19 Apr 2010 7:44
Reporter: Geert Vanderkelen Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: mysql-5.1.29-telco-6.3.19
Triage: Triaged: D4 (Minor) / R2 (Low) / E2 (Low)

[30 Oct 2008 11:34] Geert Vanderkelen
I made a mistake writing the --ndbcluster option as --ndb_cluster in the my.cnf. The outcome was the following error when starting mysqld:

shell> ./libexec/mysqld --defaults-file=../my_63.cnf
Unknown suffix '-' used for variable 'ndb-cluster-connection-pool' (value '--ndb_connectstring=localhost')
081030 12:24:07 [Warning] option 'ndb-cluster-connection-pool': unsigned value 0 adjusted to 1
081030 12:24:07 [ERROR] ./libexec/mysqld: Error while setting value '--ndb_connectstring=localhost' to 'ndb-cluster-connection-pool'

How to repeat:
To repeat, on my MacOS 10.5.5 Intel, just use faulty option:

datadir = /opt/mysql/data/63bzr
socket = /tmp/mysql.sock
port = 3307


Suggested fix:
I guess it should say that 'ndb_cluster' is not a valid option instead of saying anything about 'ndb-cluster-connection-pool' ?
[30 Oct 2008 11:37] Geert Vanderkelen
Verified using mysql-5.1.29-ndb-6.3.19 (bzr) on Linux, so same results as on Mac OS.
Changing OS to 'Any'.

Workaround is of course: "Write the option correctly as --ndbcluster"
[18 Mar 2010 7:22] Magnus Blåudd
This is a feature of mysys 'handle_options', when starting mysqld with the argument --ndb_cluster it will look for options that starts with --ndb_cluster*(or --ndb-cluster*) and if it finds only one it will assume it's the one you mean. In this case it finds --ndb-cluster-connection-pool and tries to set it's value to 'localhost'.

Read more at http://dev.mysql.com/doc/refman/5.1/en/program-options.html where it says "An option can be specified by writing it in full or as any unambiguous prefix. For example, the --compress option can be given to mysqldump as --compr, but not as --comp because the latter is ambiguous"

1) Of course it's very ugly that it tries to interpret localhost as an integer and print out the warning "unsigned value 0 adjusted
to 1". I suggest filing new bug for this to be fixed in MySQL Server.

2) The option should  actually be called ndb-connection-pool, so maybe we should add an alias for that.
[18 Apr 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[19 Apr 2010 7:44] Magnus Blåudd
Closing as "Not a bug" based on my explanation above.