Bug #39196 mysqld.cc: debug-sync-timeout option out of order
Submitted: 2 Sep 2008 17:02 Modified: 2 Sep 2008 18:10
Reporter: Paul DuBois Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:6.0.x OS:Any
Assigned to: CPU Architecture:Any

[2 Sep 2008 17:02] Paul DuBois
Description:
The entry for the debug-sync-timeout variable is out of order in the options array in mysqld.cc.

How to repeat:
By inspection of the source:

  {"tc-heuristic-recover", OPT_TC_HEURISTIC_RECOVER,
   "Decision to use in heuristic recover process. Possible values are COMMIT or ROLLBACK.",
   (uchar**) &opt_tc_heuristic_recover, (uchar**) &opt_tc_heuristic_recover,
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#if defined(ENABLED_DEBUG_SYNC)
  {"debug-sync-timeout", OPT_DEBUG_SYNC_TIMEOUT,
   "Enable the debug sync facility "
   "and optionally specify a default wait timeout in seconds. "
   "A zero value keeps the facility disabled.",
   (uchar**) &opt_debug_sync_timeout, 0,
   0, GET_UINT, OPT_ARG, 0, 0, UINT_MAX, 0, 0, 0},
#endif /* defined(ENABLED_DEBUG_SYNC) */
  {"temp-pool", OPT_TEMP_POOL,
   "Using this option will cause most temporary files created to use a small set of names, rather than a unique name for each new file.",
   (uchar**) &use_temp_pool, (uchar**) &use_temp_pool, 0, GET_BOOL, NO_ARG, 1,
   0, 0, 0, 0, 0},

Suggested fix:
Move it into the d's :-)
[2 Sep 2008 18:10] Paul DuBois
I filed this bug based on inspection of mysqld.cc. But after configuring with --enable-debug-sync and checking mysqld --verbose --help, the options came out in the right order. chad dug into the question of whether the server sorts the option entries for --help and came up with this:

"paul, found it.  it is indeed sorted.  In sql/sql_plugin.cc , of all places.  my_print_help_inc_plugins() .  Put all options in a list.  Sort the list.  Print the list."

So this bug report is bogus. I'm closing it as "Not a bug."