mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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
This commit is contained in:
@ -37,7 +37,7 @@
|
||||
** T<>nu Samuel <tonu@please.do.not.remove.this.spam.ee>
|
||||
**/
|
||||
|
||||
#define DUMP_VERSION "8.10"
|
||||
#define DUMP_VERSION "8.11"
|
||||
|
||||
#include <global.h>
|
||||
#include <my_sys.h>
|
||||
@ -75,7 +75,7 @@ static my_bool verbose=0,tFlag=0,cFlag=0,dFlag=0,quick=0, extended_insert = 0,
|
||||
opt_delayed=0,create_options=0,opt_quoted=0,opt_databases=0,
|
||||
opt_alldbs=0,opt_create_db=0,opt_first_slave=0;
|
||||
static MYSQL mysql_connection,*sock=0;
|
||||
static char insert_pat[12 * 1024],*password=0,*current_user=0,
|
||||
static char insert_pat[12 * 1024],*opt_password=0,*current_user=0,
|
||||
*current_host=0,*path=0,*fields_terminated=0,
|
||||
*lines_terminated=0, *enclosed=0, *opt_enclosed=0, *escaped=0,
|
||||
*where=0, *default_charset;
|
||||
@ -333,9 +333,12 @@ static int get_options(int *argc,char ***argv)
|
||||
case 'p':
|
||||
if (optarg)
|
||||
{
|
||||
my_free(password,MYF(MY_ALLOW_ZERO_PTR));
|
||||
password=my_strdup(optarg,MYF(MY_FAE));
|
||||
while (*optarg) *optarg++= 'x'; /* Destroy argument */
|
||||
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;
|
||||
@ -459,7 +462,7 @@ static int get_options(int *argc,char ***argv)
|
||||
return 1;
|
||||
}
|
||||
if (tty_password)
|
||||
password=get_tty_password(NullS);
|
||||
opt_password=get_tty_password(NullS);
|
||||
return(0);
|
||||
} /* get_options */
|
||||
|
||||
@ -1236,7 +1239,7 @@ int main(int argc, char **argv)
|
||||
my_end(0);
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
if (dbConnect(current_host, current_user, password))
|
||||
if (dbConnect(current_host, current_user, opt_password))
|
||||
exit(EX_MYSQLERR);
|
||||
if (!path)
|
||||
write_heder(stdout, *argv);
|
||||
@ -1276,7 +1279,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
dbDisconnect(current_host);
|
||||
puts("");
|
||||
my_free(password, MYF(MY_ALLOW_ZERO_PTR));
|
||||
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
|
||||
if (extended_insert)
|
||||
dynstr_free(&extended_row);
|
||||
my_end(0);
|
||||
|
Reference in New Issue
Block a user