Commit db89dd3a authored by Sergey Vojtovich's avatar Sergey Vojtovich

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.
parent ae09895c
...@@ -741,7 +741,8 @@ class Sys_var_dbug: public sys_var ...@@ -741,7 +741,8 @@ class Sys_var_dbug: public sys_var
on_check_function on_check_func=0, on_check_function on_check_func=0,
on_update_function on_update_func=0, on_update_function on_update_func=0,
const char *substitute=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, getopt.arg_type, SHOW_CHAR, (intptr)def_val,
lock, binlog_status_arg, on_check_func, on_update_func, lock, binlog_status_arg, on_check_func, on_update_func,
substitute) substitute)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment