diff options
author | unknown <kent@mysql.com/kent-amd64.(none)> | 2007-01-01 05:35:10 +0100 |
---|---|---|
committer | unknown <kent@mysql.com/kent-amd64.(none)> | 2007-01-01 05:35:10 +0100 |
commit | ec08ea705871be703b55add6dbf5c07abfb76e4a (patch) | |
tree | 5c828ffd8cf929223409e83dd6396e740ce28dc9 /client | |
parent | 27ecbeecdc0a064d0ff5ea88abe01e786fcc5b99 (diff) | |
parent | e809f9133efc93f9101f92697cb5b8aacbae18fc (diff) | |
download | mariadb-git-ec08ea705871be703b55add6dbf5c07abfb76e4a.tar.gz |
Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/kent/bk/tmp/mysql-5.0-build
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; |