Loading Docs/manual.texi +414 −210 File changed.Preview size limit exceeded, changes collapsed. Show changes client/mysql.cc +12 −2 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ static bool info_flag=0,ignore_errors=0,wait_flag=0,quick=0, opt_compress=0, vertical=0,skip_line_numbers=0,skip_column_names=0,opt_html=0, no_named_cmds=1; // we want this to be the default static uint verbose=0,opt_silent=0,opt_mysql_port=0; static uint verbose=0,opt_silent=0,opt_mysql_port=0,opt_connect_timeout=0; static my_string opt_mysql_unix_port=0; static int connect_flag=CLIENT_INTERACTIVE; static char *current_host,*current_db,*current_user=0,*opt_password=0, Loading Loading @@ -334,7 +334,7 @@ sig_handler mysql_end(int sig) exit(status.exit_status); } enum options {OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET} ; enum options {OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_TIMEOUT} ; static struct option long_options[] = Loading Loading @@ -374,6 +374,7 @@ static struct option long_options[] = {"socket", required_argument, 0, 'S'}, #include "sslopt-longopts.h" {"table", no_argument, 0, 't'}, {"timeout", required_argument, 0, OPT_TIMEOUT}, #ifndef DONT_ALLOW_USER_CHANGE {"user", required_argument, 0, 'u'}, #endif Loading Loading @@ -545,9 +546,12 @@ static int get_options(int argc, char **argv) case 'p': if (optarg) { 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; } else tty_password=1; Loading Loading @@ -603,6 +607,9 @@ static int get_options(int argc, char **argv) opt_mysql_unix_port=my_strdup(MYSQL_NAMEDPIPE,MYF(0)); #endif break; case OPT_TIMEOUT: opt_connect_timeout=atoi(optarg); break; case 'V': usage(1); exit(0); case 'I': case '?': Loading Loading @@ -1772,6 +1779,9 @@ sql_real_connect(char *host,char *database,char *user,char *password, connected= 0; } mysql_init(&mysql); if (opt_connect_timeout) mysql_options(&mysql,MYSQL_OPT_CONNECT_TIMEOUT, (char*) &opt_connect_timeout); if (opt_compress) mysql_options(&mysql,MYSQL_OPT_COMPRESS,NullS); #ifdef HAVE_OPENSSL Loading client/mysqladmin.c +11 −9 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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); Loading @@ -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; Loading Loading @@ -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 Loading @@ -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 { Loading @@ -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; Loading @@ -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); Loading client/mysqldump.c +11 −8 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ ** Tnu 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> Loading Loading @@ -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; Loading Loading @@ -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)); 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; Loading Loading @@ -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 */ Loading Loading @@ -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); Loading Loading @@ -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); Loading client/mysqlimport.c +10 −7 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ ** * * ** ************************* */ #define IMPORT_VERSION "2.4" #define IMPORT_VERSION "2.5" #include <global.h> #include <my_sys.h> Loading @@ -45,7 +45,7 @@ static my_bool verbose=0,lock_tables=0,ignore_errors=0,delete=0, replace=0,silent=0,ignore=0,opt_compress=0,opt_local_file=0; static MYSQL mysql_connection; static char *password=0, *current_user=0, static char *opt_password=0, *current_user=0, *current_host=0, *current_db=0, *fields_terminated=0, *lines_terminated=0, *enclosed=0, *opt_enclosed=0, *escaped=0, opt_low_priority=0, *opt_columns=0; Loading Loading @@ -202,9 +202,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)); 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; Loading Loading @@ -276,7 +279,7 @@ static int get_options(int *argc, char ***argv) current_db= *((*argv)++); (*argc)--; if (tty_password) password=get_tty_password(NullS); opt_password=get_tty_password(NullS); return(0); } Loading Loading @@ -504,7 +507,7 @@ int main(int argc, char **argv) argv_to_free= argv; if (get_options(&argc, &argv)) return(1); if (!(sock= db_connect(current_host,current_db,current_user,password))) if (!(sock= db_connect(current_host,current_db,current_user,opt_password))) return(1); /* purecov: deadcode */ if (lock_tables) lock_table(sock, argc, argv); Loading @@ -513,7 +516,7 @@ int main(int argc, char **argv) if (exitcode == 0) exitcode = error; db_disconnect(current_host, sock); my_free(password,MYF(MY_ALLOW_ZERO_PTR)); my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR)); free_defaults(argv_to_free); my_end(0); return(exitcode); Loading Loading
client/mysql.cc +12 −2 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ static bool info_flag=0,ignore_errors=0,wait_flag=0,quick=0, opt_compress=0, vertical=0,skip_line_numbers=0,skip_column_names=0,opt_html=0, no_named_cmds=1; // we want this to be the default static uint verbose=0,opt_silent=0,opt_mysql_port=0; static uint verbose=0,opt_silent=0,opt_mysql_port=0,opt_connect_timeout=0; static my_string opt_mysql_unix_port=0; static int connect_flag=CLIENT_INTERACTIVE; static char *current_host,*current_db,*current_user=0,*opt_password=0, Loading Loading @@ -334,7 +334,7 @@ sig_handler mysql_end(int sig) exit(status.exit_status); } enum options {OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET} ; enum options {OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_TIMEOUT} ; static struct option long_options[] = Loading Loading @@ -374,6 +374,7 @@ static struct option long_options[] = {"socket", required_argument, 0, 'S'}, #include "sslopt-longopts.h" {"table", no_argument, 0, 't'}, {"timeout", required_argument, 0, OPT_TIMEOUT}, #ifndef DONT_ALLOW_USER_CHANGE {"user", required_argument, 0, 'u'}, #endif Loading Loading @@ -545,9 +546,12 @@ static int get_options(int argc, char **argv) case 'p': if (optarg) { 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; } else tty_password=1; Loading Loading @@ -603,6 +607,9 @@ static int get_options(int argc, char **argv) opt_mysql_unix_port=my_strdup(MYSQL_NAMEDPIPE,MYF(0)); #endif break; case OPT_TIMEOUT: opt_connect_timeout=atoi(optarg); break; case 'V': usage(1); exit(0); case 'I': case '?': Loading Loading @@ -1772,6 +1779,9 @@ sql_real_connect(char *host,char *database,char *user,char *password, connected= 0; } mysql_init(&mysql); if (opt_connect_timeout) mysql_options(&mysql,MYSQL_OPT_CONNECT_TIMEOUT, (char*) &opt_connect_timeout); if (opt_compress) mysql_options(&mysql,MYSQL_OPT_COMPRESS,NullS); #ifdef HAVE_OPENSSL Loading
client/mysqladmin.c +11 −9 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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); Loading @@ -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; Loading Loading @@ -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 Loading @@ -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 { Loading @@ -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; Loading @@ -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); Loading
client/mysqldump.c +11 −8 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ ** Tnu 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> Loading Loading @@ -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; Loading Loading @@ -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)); 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; Loading Loading @@ -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 */ Loading Loading @@ -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); Loading Loading @@ -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); Loading
client/mysqlimport.c +10 −7 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ ** * * ** ************************* */ #define IMPORT_VERSION "2.4" #define IMPORT_VERSION "2.5" #include <global.h> #include <my_sys.h> Loading @@ -45,7 +45,7 @@ static my_bool verbose=0,lock_tables=0,ignore_errors=0,delete=0, replace=0,silent=0,ignore=0,opt_compress=0,opt_local_file=0; static MYSQL mysql_connection; static char *password=0, *current_user=0, static char *opt_password=0, *current_user=0, *current_host=0, *current_db=0, *fields_terminated=0, *lines_terminated=0, *enclosed=0, *opt_enclosed=0, *escaped=0, opt_low_priority=0, *opt_columns=0; Loading Loading @@ -202,9 +202,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)); 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; Loading Loading @@ -276,7 +279,7 @@ static int get_options(int *argc, char ***argv) current_db= *((*argv)++); (*argc)--; if (tty_password) password=get_tty_password(NullS); opt_password=get_tty_password(NullS); return(0); } Loading Loading @@ -504,7 +507,7 @@ int main(int argc, char **argv) argv_to_free= argv; if (get_options(&argc, &argv)) return(1); if (!(sock= db_connect(current_host,current_db,current_user,password))) if (!(sock= db_connect(current_host,current_db,current_user,opt_password))) return(1); /* purecov: deadcode */ if (lock_tables) lock_table(sock, argc, argv); Loading @@ -513,7 +516,7 @@ int main(int argc, char **argv) if (exitcode == 0) exitcode = error; db_disconnect(current_host, sock); my_free(password,MYF(MY_ALLOW_ZERO_PTR)); my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR)); free_defaults(argv_to_free); my_end(0); return(exitcode); Loading