diff options
author | unknown <monty@tik.mysql.com> | 2000-11-13 23:55:10 +0200 |
---|---|---|
committer | unknown <monty@tik.mysql.com> | 2000-11-13 23:55:10 +0200 |
commit | f3d2341f1f30384d92b285c1e421d8c599ee2b79 (patch) | |
tree | 6689cb755cdb6ba0fb4cc6fbb215d75b175228d2 /client/mysqladmin.c | |
parent | 675d31ee9a14d636d838400c670d0a1c2b964c9a (diff) | |
download | mariadb-git-f3d2341f1f30384d92b285c1e421d8c599ee2b79.tar.gz |
Bug fixes, TRUNCATE, safer passwords on command line and connect timeout
Docs/manual.texi:
Update of safe_mysqld, TRUNCATE and changes for 3.23.28
client/mysql.cc:
Added --timeout
client/mysqladmin.c:
Safer password handling
client/mysqldump.c:
Safer password handling
client/mysqlimport.c:
Safer password handling
client/mysqlshow.c:
Safer password handling
configure.in:
Fixes for Darwin and added test of poll
include/my_pthread.h:
Fixes for darwin
include/violite.h:
Added test for polling
libmysql/libmysql.c:
connect timeout
libmysql/violite.c:
connect timeout
mysys/hash.c:
Fix when delting from empty table
scripts/safe_mysqld.sh:
Added --open-files, --core-file-size and --timezone
sql-bench/bench-init.pl.sh:
Function print_time
sql-bench/crash-me.sh:
Added test of truncate
sql-bench/test-insert.sh:
More "estimated" tests
sql-bench/test-select.sh:
More "estimated" tests
sql/filesort.cc:
Removed allocation of extra memory
sql/ha_berkeley.cc:
Better estimation of number of rows
sql/item_create.cc:
Truncate
sql/item_create.h:
Truncate
sql/item_strfunc.cc:
Removed usage of MY_FAE
sql/lex.h:
Truncate
sql/lock.cc:
Fixed possible loop bug
sql/log.cc:
Removed usage of FILE:s
sql/mysqld.cc:
Print of more server variables
sql/sql_class.h:
Changed FILE -> File
sql/sql_insert.cc:
Fixed bug in temptable handling
sql/sql_lex.h:
Cleanup
sql/sql_load.cc:
Removed usage of MY_FAE
sql/sql_parse.cc:
Cleanup + TRUNCATE
sql/sql_select.cc:
Cleanup + fix for INSERT ... SELECT
sql/sql_yacc.yy:
TRUNCATE
sql/violite.c:
Merge with client/violite.c
strings/strstr-sparc.s:
Fixed wrong register usage
Diffstat (limited to 'client/mysqladmin.c')
-rw-r--r-- | client/mysqladmin.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/client/mysqladmin.c b/client/mysqladmin.c index f8432ec7fb6..d5b2e73451e 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -28,7 +28,7 @@ #include <my_pthread.h> /* because of signal() */ #endif -#define ADMIN_VERSION "8.9" +#define ADMIN_VERSION "8.11" #define MAX_MYSQL_VAR 64 #define MAX_TIME_TO_WAIT 3600 /* Wait for shutdown */ #define MAX_TRUNC_LENGTH 3 @@ -137,7 +137,7 @@ int main(int argc,char *argv[]) { int c, error = 0,option_index=0; MYSQL mysql; - char *host = NULL,*password=0,*user=0,**commands; + char *host = NULL,*opt_password=0,*user=0,**commands; my_bool tty_password=0; MY_INIT(argv[0]); mysql_init(&mysql); @@ -160,9 +160,12 @@ int main(int argc,char *argv[]) case 'p': if (optarg) { - my_free(password,MYF(MY_ALLOW_ZERO_PTR)); - password=my_strdup(optarg,MYF(MY_FAE)); + char *start=optarg; + my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR)); + opt_password=my_strdup(optarg,MYF(MY_FAE)); while (*optarg) *optarg++= 'x'; /* Destroy argument */ + if (*start) + start[1]=0; /* Cut length of argument */ } else tty_password=1; @@ -243,12 +246,11 @@ int main(int argc,char *argv[]) exit(1); } if (tty_password) - password = get_tty_password(NullS); + opt_password = get_tty_password(NullS); VOID(signal(SIGINT,endprog)); /* Here if abort */ VOID(signal(SIGTERM,endprog)); /* Here if abort */ - mysql_init(&mysql); if (opt_compress) mysql_options(&mysql,MYSQL_OPT_COMPRESS,NullS); #ifdef HAVE_OPENSSL @@ -256,7 +258,7 @@ int main(int argc,char *argv[]) mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, opt_ssl_capath); #endif /* HAVE_OPENSSL */ - if (sql_connect(&mysql,host,user,password,option_wait)) + if (sql_connect(&mysql,host,user,opt_password,option_wait)) error = 1; else { @@ -269,7 +271,7 @@ int main(int argc,char *argv[]) if (option_wait && !interrupted) { mysql_close(&mysql); - if (!sql_connect(&mysql,host,user,password,option_wait)) + if (!sql_connect(&mysql,host,user,opt_password,option_wait)) continue; /* Retry */ } error=1; @@ -286,7 +288,7 @@ int main(int argc,char *argv[]) } mysql_close(&mysql); } - my_free(password,MYF(MY_ALLOW_ZERO_PTR)); + my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR)); my_free(user,MYF(MY_ALLOW_ZERO_PTR)); free_defaults(argv); my_end(0); |