From 700513a41a06b504a24020ab9e5216450f01e01f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Feb 2002 08:24:40 -0600 Subject: mysqldump.c: Changed C++ style comments to ANSI C style. client/mysqldump.c: Changed C++ style comments to ANSI C style. BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- client/mysqldump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/mysqldump.c b/client/mysqldump.c index 8020fa58304..b1d3195eba9 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1192,7 +1192,7 @@ static void dumpTable(uint numFields, char *table) fputs(");\n", md_result_file); } - //XML - close table tag and supress regular output + /*XML - close table tag and supress regular output*/ if (opt_xml) fprintf(md_result_file, "\t\n", table); else if (extended_insert && row_break) @@ -1295,7 +1295,7 @@ static int dump_databases(char **db_names) int result=0; for ( ; *db_names ; db_names++) { - //XML edit - add database element + /*XML edit - add database element*/ if (opt_xml) fprintf(md_result_file, "<%s>\n", *db_names); if (dump_all_tables_in_db(*db_names)) -- cgit v1.2.1 From 33d2d76549f8ccf037f733c61e2b9c17500fe738 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Feb 2002 21:53:26 +0200 Subject: Made LOAD DATA LOCAL INFILE more secure Docs/manual.texi: Changelog sql/sql_yacc.yy: optimization BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- client/client_priv.h | 2 +- client/mysql.cc | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'client') diff --git a/client/client_priv.h b/client/client_priv.h index 261367f7176..56eaf311070 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -30,4 +30,4 @@ enum options { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_LOW_PRIORITY, OPT_AUTO_REPAIR, OPT_COMPRESS, OPT_DROP, OPT_LOCKS, OPT_KEYWORDS, OPT_DELAYED, OPT_OPTIMIZE, OPT_FTB, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_TABLES, - OPT_MASTER_DATA, OPT_AUTOCOMMIT}; + OPT_MASTER_DATA, OPT_AUTOCOMMIT, OPT_LOCAL_INFILE}; diff --git a/client/mysql.cc b/client/mysql.cc index 5ae8df39863..cfe6d823cac 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -34,7 +34,7 @@ #include "my_readline.h" #include -const char *VER="11.15"; +const char *VER="11.16"; /* Don't try to make a nice table if the data is too big */ #define MAX_COLUMN_LENGTH 1024 @@ -113,10 +113,10 @@ static MYSQL mysql; /* The connection */ static bool info_flag=0,ignore_errors=0,wait_flag=0,quick=0, connected=0,opt_raw_data=0,unbuffered=0,output_tables=0, no_rehash=0,skip_updates=0,safe_updates=0,one_database=0, - opt_compress=0, + opt_compress=0, using_opt_local_infile=0, vertical=0,skip_line_numbers=0,skip_column_names=0,opt_html=0, opt_nopager=1, opt_outfile=0, no_named_cmds=1; -static uint verbose=0,opt_silent=0,opt_mysql_port=0; +static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=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, @@ -394,6 +394,7 @@ static struct option long_options[] = {"html", no_argument, 0, 'H'}, {"host", required_argument, 0, 'h'}, {"ignore-spaces", no_argument, 0, 'i'}, + {"local-infile", optional_argument, 0, OPT_LOCAL_INFILE}, {"no-auto-rehash",no_argument, 0, 'A'}, {"no-named-commands", no_argument, 0, 'g'}, {"no-tee", no_argument, 0, OPT_NOTEE}, @@ -693,6 +694,10 @@ static int get_options(int argc, char **argv) case 'C': opt_compress=1; break; + case OPT_LOCAL_INFILE: + using_opt_local_infile=1; + opt_local_infile= test(!optarg || atoi(optarg)>0); + break; case 'L': skip_line_numbers=1; break; @@ -2105,6 +2110,8 @@ sql_real_connect(char *host,char *database,char *user,char *password, } if (opt_compress) mysql_options(&mysql,MYSQL_OPT_COMPRESS,NullS); + if (using_opt_local_infile) + mysql_options(&mysql,MYSQL_OPT_LOCAL_INFILE, (char*) &opt_local_infile); #ifdef HAVE_OPENSSL if (opt_use_ssl) mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, -- cgit v1.2.1