diff options
author | monty@mashka.mysql.fi <> | 2003-09-11 20:24:14 +0300 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2003-09-11 20:24:14 +0300 |
commit | 73f66f68fd9588d89a0dac8457bab8e713ae7a49 (patch) | |
tree | 20f0ccc7be8e0d205ea5a00d6ec5f57a14d85d3f /client/mysqlimport.c | |
parent | 45aa92c574e032bcf85b7207732158433e64afd5 (diff) | |
parent | 62103fff405545e022c61721c62eec0e5d7d264d (diff) | |
download | mariadb-git-73f66f68fd9588d89a0dac8457bab8e713ae7a49.tar.gz |
merge with 4.0.15
Diffstat (limited to 'client/mysqlimport.c')
-rw-r--r-- | client/mysqlimport.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/client/mysqlimport.c b/client/mysqlimport.c index 4cff5fdfcc7..5ad6d1dc429 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -45,16 +45,15 @@ static char *opt_password=0, *current_user=0, *lines_terminated=0, *enclosed=0, *opt_enclosed=0, *escaped=0, *opt_columns=0, *default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME; -static uint opt_mysql_port=0; +static uint opt_mysql_port= 0, opt_protocol= 0; static my_string opt_mysql_unix_port=0; -static my_string opt_ignore_lines=0; +static longlong opt_ignore_lines= -1; static CHARSET_INFO *charset_info= &my_charset_latin1; #include <sslopt-vars.h> #ifdef HAVE_SMEM static char *shared_memory_base_name=0; #endif -static uint opt_protocol=0; static struct my_option my_long_options[] = { @@ -97,7 +96,7 @@ static struct my_option my_long_options[] = {"ignore", 'i', "If duplicate unique key was found, keep old row.", (gptr*) &ignore, (gptr*) &ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"ignore-lines", OPT_IGN_LINES, "Ignore first n lines of data infile.", - (gptr*) &opt_ignore_lines, (gptr*) &opt_ignore_lines, 0, GET_STR, + (gptr*) &opt_ignore_lines, (gptr*) &opt_ignore_lines, 0, GET_LL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"lines-terminated-by", OPT_LTB, "Lines in the i.file are terminated by ...", (gptr*) &lines_terminated, (gptr*) &lines_terminated, 0, GET_STR, @@ -311,8 +310,9 @@ static int write_to_table(char *filename, MYSQL *sock) " OPTIONALLY ENCLOSED BY"); end= add_load_option(end, escaped, " ESCAPED BY"); end= add_load_option(end, lines_terminated, " LINES TERMINATED BY"); - if (opt_ignore_lines) - end= strmov(strmov(strmov(end, " IGNORE "), opt_ignore_lines), " LINES"); + if (opt_ignore_lines >= 0) + end= strmov(longlong10_to_str(opt_ignore_lines, + strmov(end, " IGNORE "),10), " LINES"); if (opt_columns) end= strmov(strmov(strmov(end, " ("), opt_columns), ")"); *end= '\0'; |