From 5193315f9d9012beea31b9110a3385784e803ee6 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 6 Sep 2003 15:06:08 -0400 Subject: added space after first '--' in the long '----....' comment line in mysqldump just to make it compatible with the manual (fixed bug #1056) client/mysqldump.c: added space after first '--' in the long '----....' comment line just to make it compatible with the manual (fixed bug #1056) --- client/mysqldump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index f1425faf0ed..68af4fd6953 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -307,7 +307,7 @@ static void write_header(FILE *sql_file, char *db_name) fprintf(sql_file, "-- MySQL dump %s\n--\n", DUMP_VERSION); fprintf(sql_file, "-- Host: %s Database: %s\n", current_host ? current_host : "localhost", db_name ? db_name : ""); - fputs("---------------------------------------------------------\n", + fputs("-- ------------------------------------------------------\n", sql_file); fprintf(sql_file, "-- Server version\t%s\n", mysql_get_server_info(&mysql_connection)); -- cgit v1.2.1 From 7b107a966a3b968dcc14501c3678a6911d74d81e Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 6 Sep 2003 18:59:04 -0400 Subject: fixed Bug #1184 (change type of opt_ignore_lines to longlong) --- client/mysqlimport.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/mysqlimport.c b/client/mysqlimport.c index d7f6c4c0368..c72e32dd2a7 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -46,7 +46,7 @@ static char *opt_password=0, *current_user=0, *escaped=0, *opt_columns=0, *default_charset; static uint opt_mysql_port=0; static my_string opt_mysql_unix_port=0; -static my_string opt_ignore_lines=0; +static longlong opt_ignore_lines= -1; #include static struct my_option my_long_options[] = @@ -90,7 +90,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, @@ -290,8 +290,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'; -- cgit v1.2.1