summaryrefslogtreecommitdiff
path: root/client/mysqladmin.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-09-03 14:04:17 +0200
committerSergei Golubchik <serg@mariadb.org>2016-09-12 17:51:50 +0200
commitece01ef3dc89d20198efbaec40e7114fdb515338 (patch)
tree7f3c1f1ee812b8bf8fa98fee94103dae4d7afa0d /client/mysqladmin.cc
parent12067633fb44205777e2e9f401bbcb3242bafd66 (diff)
downloadmariadb-git-ece01ef3dc89d20198efbaec40e7114fdb515338.tar.gz
After-review changes
* remove redundant code * fix tests * move declarations and defines where they belong
Diffstat (limited to 'client/mysqladmin.cc')
-rw-r--r--client/mysqladmin.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index fcc4e626f2f..d186a4c7fcc 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -22,7 +22,6 @@
#include <my_pthread.h> /* because of signal() */
#include <sys/stat.h>
#include <mysql.h>
-#include <sql_common.h>
#include <mysql_version.h>
#include <welcome_copyright_notice.h>
#include <my_rnd.h>
@@ -545,16 +544,16 @@ static my_bool sql_connect(MYSQL *mysql, uint wait)
{
fprintf(stderr,
"Check that mysqld is running and that the socket: '%s' exists!\n",
- unix_port ? unix_port : MYSQL_UNIX_ADDR);
+ unix_port ? unix_port : mysql_unix_port);
}
else if (mysql_errno(mysql) == CR_CONN_HOST_ERROR ||
mysql_errno(mysql) == CR_UNKNOWN_HOST)
{
fprintf(stderr,"Check that mysqld is running on %s",host);
fprintf(stderr," and that the port is %d.\n",
- tcp_port ? tcp_port: MYSQL_PORT);
+ tcp_port ? tcp_port: mysql_port);
fprintf(stderr,"You can check this by doing 'telnet %s %d'\n",
- host, tcp_port ? tcp_port: MYSQL_PORT);
+ host, tcp_port ? tcp_port: mysql_port);
}
}
return 1;
@@ -1080,9 +1079,9 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
}
}
if (old)
- my_make_scrambled_password_323(crypted_pw, typed_password, sizeof(crypted_pw));
+ my_make_scrambled_password_323(crypted_pw, typed_password, strlen(typed_password));
else
- my_make_scrambled_password(crypted_pw, typed_password, sizeof(crypted_pw));
+ my_make_scrambled_password(crypted_pw, typed_password, strlen(typed_password));
}
else
crypted_pw[0]=0; /* No password */