Loading client/mysql_upgrade.c +11 −1 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ void set_extra_default(int id, const struct my_option *opt) case 'f': /* --force is ours */ case 'u': /* --user passed on cmdline */ case 'T': /* --debug-info is not accepted by mysqlcheck */ case 'p': /* --password may change yet */ /* so, do nothing */ break; default: Loading Loading @@ -175,7 +176,7 @@ void set_extra_default(int id, const struct my_option *opt) d->id= id; d->name= opt->name; d->n_len= strlen(opt->name); if (opt->arg_type != NO_ARG) if (opt->arg_type != NO_ARG && opt->value) switch (opt->var_type & GET_TYPE_MASK) { case GET_BOOL: if (*((int *)opt->value)) Loading Loading @@ -321,6 +322,15 @@ static int create_defaults_file(const char *path, const char *forced_path) } dynstr_set(&buf, "\n[client]"); if (opt_password) { if (dynstr_append(&buf, "\npassword=") || dynstr_append(&buf, opt_password)) { ret = 1; goto error; } } while (extra_defaults) { int len; Loading Loading
client/mysql_upgrade.c +11 −1 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ void set_extra_default(int id, const struct my_option *opt) case 'f': /* --force is ours */ case 'u': /* --user passed on cmdline */ case 'T': /* --debug-info is not accepted by mysqlcheck */ case 'p': /* --password may change yet */ /* so, do nothing */ break; default: Loading Loading @@ -175,7 +176,7 @@ void set_extra_default(int id, const struct my_option *opt) d->id= id; d->name= opt->name; d->n_len= strlen(opt->name); if (opt->arg_type != NO_ARG) if (opt->arg_type != NO_ARG && opt->value) switch (opt->var_type & GET_TYPE_MASK) { case GET_BOOL: if (*((int *)opt->value)) Loading Loading @@ -321,6 +322,15 @@ static int create_defaults_file(const char *path, const char *forced_path) } dynstr_set(&buf, "\n[client]"); if (opt_password) { if (dynstr_append(&buf, "\npassword=") || dynstr_append(&buf, opt_password)) { ret = 1; goto error; } } while (extra_defaults) { int len; Loading