summaryrefslogtreecommitdiff
path: root/client/mysqlimport.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysqlimport.c')
-rw-r--r--client/mysqlimport.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index c68d2d9f724..fae84be610a 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -25,7 +25,7 @@
** * *
** *************************
*/
-#define IMPORT_VERSION "3.4"
+#define IMPORT_VERSION "3.5"
#include "client_priv.h"
#include "mysql_version.h"
@@ -191,6 +191,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
while (*argument) *argument++= 'x'; /* Destroy argument */
if (*start)
start[1]=0; /* Cut length of argument */
+ tty_password= 0;
}
else
tty_password= 1;
@@ -263,14 +264,11 @@ static int write_to_table(char *filename, MYSQL *sock)
{
char tablename[FN_REFLEN], hard_path[FN_REFLEN],
sql_statement[FN_REFLEN*16+256], *end;
- my_bool local_file;
DBUG_ENTER("write_to_table");
DBUG_PRINT("enter",("filename: %s",filename));
- local_file= sock->unix_socket == 0 || opt_local_file;
-
fn_format(tablename, filename, "", "", 1 | 2); /* removes path & ext. */
- if (local_file)
+ if (! opt_local_file)
strmov(hard_path,filename);
else
my_load_path(hard_path, filename, NULL); /* filename includes the path */
@@ -289,7 +287,7 @@ static int write_to_table(char *filename, MYSQL *sock)
to_unix_path(hard_path);
if (verbose)
{
- if (local_file)
+ if (opt_local_file)
fprintf(stdout, "Loading data from LOCAL file: %s into %s\n",
hard_path, tablename);
else
@@ -298,7 +296,7 @@ static int write_to_table(char *filename, MYSQL *sock)
}
sprintf(sql_statement, "LOAD DATA %s %s INFILE '%s'",
opt_low_priority ? "LOW_PRIORITY" : "",
- local_file ? "LOCAL" : "", hard_path);
+ opt_local_file ? "LOCAL" : "", hard_path);
end= strend(sql_statement);
if (replace)
end= strmov(end, " REPLACE");