mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
MDEV-7364 - mysqld --help --verbose prints random values for "debug"
better fix that doesn't make debug-dbug variable to disappear from mysqld --help output (this fact is used by have_debug.inc) and shows correctly what dbug value was set on the command line.
This commit is contained in:
parent
3fcbd7cb47
commit
2501a0ea59
3 changed files with 4 additions and 2 deletions
|
@ -1418,7 +1418,7 @@ my_bool plugins_are_initialized= FALSE;
|
|||
#ifndef DBUG_OFF
|
||||
static const char* default_dbug_option;
|
||||
#endif
|
||||
static const char *current_dbug_option="disabled";
|
||||
const char *current_dbug_option="";
|
||||
#ifdef HAVE_LIBWRAP
|
||||
const char *libwrapName= NULL;
|
||||
int allow_severity = LOG_INFO;
|
||||
|
@ -8641,6 +8641,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
|
|||
if (argument[0] == '1' && !argument[1])
|
||||
break;
|
||||
DBUG_SET_INITIAL(argument);
|
||||
current_dbug_option= argument;
|
||||
opt_endinfo=1; /* unireg: memory allocation */
|
||||
#else
|
||||
sql_print_warning("'%s' is disabled in this build", opt->name);
|
||||
|
|
|
@ -105,6 +105,7 @@ extern my_bool read_only, opt_readonly;
|
|||
extern my_bool lower_case_file_system;
|
||||
extern my_bool opt_enable_named_pipe, opt_sync_frm, opt_allow_suspicious_udfs;
|
||||
extern my_bool opt_secure_auth;
|
||||
extern const char *current_dbug_option;
|
||||
extern char* opt_secure_file_priv;
|
||||
extern char* opt_secure_backup_file_priv;
|
||||
extern size_t opt_secure_backup_file_priv_len;
|
||||
|
|
|
@ -742,7 +742,7 @@ public:
|
|||
on_update_function on_update_func=0,
|
||||
const char *substitute=0)
|
||||
: sys_var(&all_sys_vars, name_arg, comment, flag_args,
|
||||
- (ptrdiff_t) &global_system_variables, getopt.id,
|
||||
(char*)¤t_dbug_option-(char*)&global_system_variables, getopt.id,
|
||||
getopt.arg_type, SHOW_CHAR, (intptr)def_val,
|
||||
lock, binlog_status_arg, on_check_func, on_update_func,
|
||||
substitute)
|
||||
|
|
Loading…
Reference in a new issue