MDEV-7364 - mysqld --help --verbose prints random values for "debug"

getopt value pointer of "debug" variable was pointing to incorrect address:
&global_system_variables. Runtime statements like SHOW VARIABLES materialize
value from DBUG structures on demand, so they never access getopt value pointer.
But mysqld --help --verbose loaded this value from &global_system_variables.

Remove "debug" variable from mysqld --help --verbose output by setting value
pointer to NULL.
This commit is contained in:
Sergey Vojtovich 2014-12-26 13:07:43 +04:00
parent ae09895c91
commit db89dd3a8f

View file

@ -741,7 +741,8 @@ public:
on_check_function on_check_func=0,
on_update_function on_update_func=0,
const char *substitute=0)
: sys_var(&all_sys_vars, name_arg, comment, flag_args, 0, getopt.id,
: sys_var(&all_sys_vars, name_arg, comment, flag_args,
- (ptrdiff_t) &global_system_variables, getopt.id,
getopt.arg_type, SHOW_CHAR, (intptr)def_val,
lock, binlog_status_arg, on_check_func, on_update_func,
substitute)