Changeset: 1fbfd5876f3d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1fbfd5876f3d Modified Files: gdk/gdk_bbp.c monetdb5/modules/mal/tablet.c sql/test/copy/Tests/int_parse.stable.err sql/test/copy/Tests/int_parse.stable.out sql/test/copy/Tests/int_parse_best.stable.out sql/test/pg_regress/Tests/strings.stable.err.int128 sql/test/pg_regress/Tests/strings.stable.out Branch: default Log Message:
merged with jul2015 diffs (119 lines): diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -3530,6 +3530,10 @@ BBPsync(int cnt, bat *subcommit) backup_dir = backup_subdir = 0; (void) GDKremovedir(0, DELDIR); (void) BBPprepare(0); /* (try to) remove DELDIR and set up new BAKDIR */ + if (backup_files > 1) { + PERFDEBUG fprintf(stderr, "%d\n", backup_files); + backup_files = 1; + } } } PERFDEBUG fprintf(stderr, "#BBPsync (ready time %d)\n", (t0 = GDKms()) - t1); diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c --- a/monetdb5/modules/mal/tablet.c +++ b/monetdb5/modules/mal/tablet.c @@ -969,7 +969,7 @@ SQLload_parse_line(READERtask *task, int char *line = task->lines[task->cur][idx]; Tablet *as = task->as; Column *fmt = as->format; - int error = 0, skip; + int error = 0; str errline = 0; #ifdef _DEBUG_TABLET_ @@ -982,10 +982,8 @@ SQLload_parse_line(READERtask *task, int if (task->quote || task->seplen != 1) { for (i = 0; i < as->nr_attrs; i++) { task->fields[i][idx] = line; - skip = 0; /* recognize fields starting with a quote, keep them */ if (*line == task->quote) { - skip = 1; #ifdef _DEBUG_TABLET_ mnstr_printf(GDKout, "before #1 %s\n", s = line); #endif @@ -1032,7 +1030,7 @@ SQLload_parse_line(READERtask *task, int endoffieldcheck: ; /* check for user defined NULL string */ - if (!skip && fmt->nullstr && task->fields[i][idx] && strncasecmp(task->fields[i][idx], fmt->nullstr, fmt->null_length + 1) == 0) + if (!fmt->skip && fmt->nullstr && task->fields[i][idx] && strncasecmp(task->fields[i][idx], fmt->nullstr, fmt->null_length + 1) == 0) task->fields[i][idx] = 0; } #ifdef _DEBUG_TABLET_ diff --git a/sql/test/copy/Tests/int_parse.stable.err b/sql/test/copy/Tests/int_parse.stable.err --- a/sql/test/copy/Tests/int_parse.stable.err +++ b/sql/test/copy/Tests/int_parse.stable.err @@ -30,17 +30,13 @@ stderr of test 'int_parse` in directory # 11:23:33 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-4649" "--port=31080" # 11:23:33 > -MAPI = (monetdb) /var/tmp/mtest-18609/.s.monetdb.32538 -QUERY = copy 1 records into t_int from stdin USING DELIMITERS ',','\n','\"' NULL AS ''; - "" -ERROR = !Failed to import table line 1 field 1 'int' expected in '' -MAPI = (monetdb) /var/tmp/mtest-18609/.s.monetdb.32538 +MAPI = (monetdb) /var/tmp/mtest-8167/.s.monetdb.37816 QUERY = copy 3 records into t_int from stdin USING DELIMITERS ',','\n','\"' NULL AS ''; 0 5.1 9 ERROR = !Failed to import table line 2 field 1 'int' expected in '5.1' -MAPI = (monetdb) /var/tmp/mtest-18609/.s.monetdb.32538 +MAPI = (monetdb) /var/tmp/mtest-8167/.s.monetdb.37816 QUERY = copy 5 records into t_int from stdin delimiters ',','\n' NULL as ''; 1 nil diff --git a/sql/test/copy/Tests/int_parse.stable.out b/sql/test/copy/Tests/int_parse.stable.out --- a/sql/test/copy/Tests/int_parse.stable.out +++ b/sql/test/copy/Tests/int_parse.stable.out @@ -25,13 +25,17 @@ Ready. # 13:54:35 > #create table t_int(i int); +#copy 1 records into t_int from stdin USING DELIMITERS ',','\n','\"' NULL AS ''; +#"" +[ 1 ] #select * from t_int; % sys.t_int # table_name % i # name % int # type % 1 # length +[ NULL ] #delete from t_int; -[ 0 ] +[ 1 ] #copy 2 records into t_int from stdin USING DELIMITERS ',','\n','\"' NULL AS ''; #3.00 #-4.0000 diff --git a/sql/test/copy/Tests/int_parse_best.stable.out b/sql/test/copy/Tests/int_parse_best.stable.out --- a/sql/test/copy/Tests/int_parse_best.stable.out +++ b/sql/test/copy/Tests/int_parse_best.stable.out @@ -62,20 +62,20 @@ Ready. #create table t_int(i int); #copy 1 records into t_int from stdin USING DELIMITERS ',','\n','\"' NULL AS '' best effort; #"" -[ 0 ] +[ 1 ] #select * from t_int; % sys.t_int # table_name % i # name % int # type % 1 # length +[ NULL ] #select * from sys.rejects; % .rejects, .rejects, .rejects, .rejects # table_name % rowid, fldid, message, input # name % bigint, int, clob, clob # type -% 1, 1, 14, 1 # length -[ 1, 1, "'int' expected", "\n" ] +% 1, 1, 0, 0 # length #delete from t_int; -[ 0 ] +[ 1 ] #copy 2 records into t_int from stdin USING DELIMITERS ',','\n','\"' NULL AS '' best effort; #3.00 #-4.0000 _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list