diff options
author | unknown <joerg@trift2.> | 2006-12-28 18:22:43 +0100 |
---|---|---|
committer | unknown <joerg@trift2.> | 2006-12-28 18:22:43 +0100 |
commit | e9adafcdf6bfdc1d6eb1fcac009fb8fbe2471f2a (patch) | |
tree | 814193edd86ff5905bbc62c4acb8aa2eb20ca8c7 /client | |
parent | 655650f58c14e727ae1fe4d606cd062c715a4c20 (diff) | |
parent | e26b3aefdbc773bd31743d36baa87609ba37e9ea (diff) | |
download | mariadb-git-e9adafcdf6bfdc1d6eb1fcac009fb8fbe2471f2a.tar.gz |
Merge trift2.:/MySQL/M50/mysql-5.0
into trift2.:/MySQL/M50/push-5.0
client/mysql_upgrade.c:
Auto merged
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql_upgrade.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 38902df2bbf..21132dd16c0 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -143,6 +143,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: @@ -174,7 +175,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)) @@ -320,6 +321,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; |