| Bug #34635 | my_long_options in mysqld.cc contains duplicate entries | ||
|---|---|---|---|
| Submitted: | 18 Feb 2008 11:35 | Modified: | 18 May 2010 14:06 |
| Reporter: | Sergei Golubchik | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
| Version: | 5.0+ | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[31 Aug 2009 17:01]
Sergei Golubchik
will be fixed in WL#4738
[18 May 2010 14:06]
Paul DuBois
Fixed in 5.5.3/6.0.14 by WL#4738. See 5.5.3/6.0.14 changelog entry on handling of system variables and command-line options.

Description: my_long_options in mysqld.cc contains duplicate entries, for example {"ndb-use-exact-count", OPT_NDB_USE_EXACT_COUNT, ... 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0}, {"ndb_use_exact_count", OPT_NDB_USE_EXACT_COUNT, "same as --ndb-use-exact-count.", (uchar**) &global_system_variables.ndb_use_exact_count, (uchar**) &global_system_variables.ndb_use_exact_count, 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0}, {"ndb-use-transactions", OPT_NDB_USE_TRANSACTIONS, ... {"ndb_use_transactions", OPT_NDB_USE_TRANSACTIONS, "same as --ndb-use-transactions.", (uchar**) &global_system_variables.ndb_use_transactions, (uchar**) &global_system_variables.ndb_use_transactions, 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0}, Second copies are useless, as my_getopt treats '-' and '_' as equal on comparison. How to repeat: . Suggested fix: remove duplicates. To reduce the confusion and for consistency print all option names in --help with dashes, performing the replacement in my_print_help and my_print_variables.