summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <patg@radha.patg.net>2006-12-22 08:57:32 -0500
committerunknown <patg@radha.patg.net>2006-12-22 08:57:32 -0500
commit8a1ff42fe0fa5514ba6d28408215a54bc4ed5e9d (patch)
tree9ae09ecf78b4d6982791b9fd82361130b93404ec /client
parent8f3e39bd4985cd6cde244c6a2eb27950ade33585 (diff)
parentb95a067685ed8f902e0f92f89c16a374c9214980 (diff)
downloadmariadb-git-8a1ff42fe0fa5514ba6d28408215a54bc4ed5e9d.tar.gz
Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.1
into radha.patg.net:/Users/patg/mysql-build/mysql-5.1-arch-merge mysql-test/t/disabled.def: Auto merged sql/mysqld.cc: Auto merged storage/innobase/handler/ha_innodb.cc: Auto merged
Diffstat (limited to 'client')
-rw-r--r--client/mysql_upgrade.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 411d3029c14..b217a4f19b9 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -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:
@@ -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))
@@ -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;