summaryrefslogtreecommitdiff
path: root/client/mysqladmin.c
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-03-18 00:16:04 +0200
committerunknown <monty@mysql.com>2004-03-18 00:16:04 +0200
commit24148f04c736679a69fd305270617616906f3697 (patch)
tree2bd46f92f467b68e9b652a280b512a9cf0413ca2 /client/mysqladmin.c
parent7395d54d5b59d9615773c1300953df3b225b0027 (diff)
parent022c5241a9ebcd6047b761ef437f51e62722f9e9 (diff)
downloadmariadb-git-24148f04c736679a69fd305270617616906f3697.tar.gz
merge fixes (use old code)
client/mysqladmin.c: Auto merged client/mysqltest.c: Auto merged innobase/dict/dict0dict.c: Auto merged innobase/include/os0file.h: Auto merged innobase/os/os0file.c: Auto merged myisam/mi_check.c: Auto merged sql/ha_innodb.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/mysql_priv.h: Auto merged sql/opt_range.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_handler.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'client/mysqladmin.c')
-rw-r--r--client/mysqladmin.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/client/mysqladmin.c b/client/mysqladmin.c
index 46bdb896c59..a2cce3782d6 100644
--- a/client/mysqladmin.c
+++ b/client/mysqladmin.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (C) 2000-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -140,7 +140,7 @@ static struct my_option my_long_options[] =
NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"port", 'P', "Port number to use for connection.", (gptr*) &tcp_port,
- (gptr*) &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ (gptr*) &tcp_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0},
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"relative", 'r',
@@ -440,6 +440,7 @@ static my_bool sql_connect(MYSQL *mysql, uint wait)
}
}
+
/*
Execute a command.
Return 0 on ok
@@ -450,6 +451,14 @@ static my_bool sql_connect(MYSQL *mysql, uint wait)
static int execute_commands(MYSQL *mysql,int argc, char **argv)
{
const char *status;
+ /*
+ MySQL documentation relies on the fact that mysqladmin will
+ execute commands in the order specified, e.g.
+ mysqladmin -u root flush-privileges password "newpassword"
+ to reset a lost root password.
+ If this behaviour is ever changed, Docs should be notified.
+ */
+
struct rand_struct rand_st;
for (; argc > 0 ; argv++,argc--)