summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <ted@ted.mysql.internal>2006-09-15 04:01:47 +0400
committerunknown <ted@ted.mysql.internal>2006-09-15 04:01:47 +0400
commitef218ff99de63c1121bc7e58184ead1e0023d70c (patch)
tree7d0865c1da4c83eef2256e6fe964bd52b8647e40 /client
parent0aa344f3f3868a1e5025cccc5399ad04906a0972 (diff)
downloadmariadb-git-ef218ff99de63c1121bc7e58184ead1e0023d70c.tar.gz
Bug#21011 The [client] group header was overwritten by "password" option in upgrade_defaults file which confused mysqlcheck thus used to prevent the whole thing from running correctly when the "--password=" option is specified on mysql_upgrade command line with no corresponding "--user=" option
client/mysql_upgrade.c: The "password" option should be issued after group header to upgrade_defaults file whenever it is used
Diffstat (limited to 'client')
-rw-r--r--client/mysql_upgrade.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 9a73263f558..6ec361392c8 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -200,7 +200,7 @@ retry_open:
}
buffer_end= strnmov(buffer, "\n[client]", sizeof(buffer));
if (opt_password)
- buffer_end= strxnmov(buffer, sizeof(buffer),
+ buffer_end= strxnmov(buffer_end, sizeof(buffer),
"\npassword=", opt_password, NullS);
error= my_write(defaults_file, buffer, (int) (buffer_end - buffer),
MYF(MY_WME | MY_FNABP));