Changeset: 1bcf32631114 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1bcf32631114 Added Files: sql/test/Tests/constant-not-in.sql sql/test/Tests/constant-not-in.stable.err sql/test/Tests/constant-not-in.stable.out Modified Files: clients/mapilib/mapi.c gdk/gdk_batop.c gdk/gdk_bbp.c monetdb5/mal/Tests/tst1200.stable.out monetdb5/mal/Tests/tst1203.stable.out monetdb5/modules/atoms/Tests/json04.stable.out monetdb5/optimizer/opt_pipes.c sql/backends/monet5/UDF/pyapi/Tests/pyapi_returntypes.stable.out sql/server/rel_planner.c sql/test/Tests/All tools/merovingian/daemon/controlrunner.c Branch: default Log Message:
Merge with Jul2017 branch. diffs (truncated from 645 to 300 lines): diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c --- a/clients/mapilib/mapi.c +++ b/clients/mapilib/mapi.c @@ -3827,6 +3827,7 @@ parse_header_line(MapiHdl hdl, char *lin } if (strcmp(tag, "name") == 0) { + result->fieldcnt = n; for (i = 0; i < n; i++) { if (anchors[i]) { if (result->fields[i].columnname) @@ -3836,6 +3837,7 @@ parse_header_line(MapiHdl hdl, char *lin } } } else if (strcmp(tag, "type") == 0) { + result->fieldcnt = n; for (i = 0; i < n; i++) { if (anchors[i]) { if (result->fields[i].columntype) @@ -3845,11 +3847,13 @@ parse_header_line(MapiHdl hdl, char *lin } } } else if (strcmp(tag, "length") == 0) { + result->fieldcnt = n; for (i = 0; i < n; i++) { if (anchors[i]) result->fields[i].columnlength = atoi(anchors[i]); } } else if (strcmp(tag, "table_name") == 0) { + result->fieldcnt = n; for (i = 0; i < n; i++) { if (anchors[i]) { if (result->fields[i].tablename) @@ -3859,6 +3863,7 @@ parse_header_line(MapiHdl hdl, char *lin } } } else if (strcmp(tag, "typesizes") == 0) { + result->fieldcnt = n; for (i = 0; i < n; i++) { if (anchors[i]) { char *p; diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -957,8 +957,8 @@ BATkeyed(BAT *b) (b->batPersistence == PERSISTENT && BAThash(b, 0) == GDK_SUCCEED) #ifndef DISABLE_PARENT_HASH - || ((parent = VIEWtparent(b)) != 0 && - BATcheckhash(BBPdescriptor(parent))) + || (VIEWtparent(b) != 0 && + BATcheckhash(BBPdescriptor(VIEWtparent(b)))) #endif ) { /* we already have a hash table on b, or b is @@ -969,8 +969,8 @@ BATkeyed(BAT *b) hs = b->thash; #ifndef DISABLE_PARENT_HASH - if (b->thash == NULL && (parent = VIEWtparent(b)) != 0) { - BAT *b2 = BBPdescriptor(parent); + if (b->thash == NULL && VIEWtparent(b) != 0) { + BAT *b2 = BBPdescriptor(VIEWtparent(b)); lo = (BUN) ((b->theap.base - b2->theap.base) >> b->tshift); hs = b2->thash; } diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -946,7 +946,7 @@ headheapinit(oid *hseq, const char *buf, int n; if (sscanf(buf, - " %10s %hu %hu %hu %lld %lld %lld %lld %lld %lld %lld %lld %hu" + " %10s %hu %hu %hu "LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT" %hu" "%n", type, &width, &var, &properties, &nokey0, &nokey1, &nosorted, &norevsorted, &base, @@ -990,14 +990,14 @@ heapinit(BAT *b, const char *buf, int *h norevsorted = 0; /* default for first case */ if (bbpversion <= GDKLIBRARY_TALIGN ? sscanf(buf, - " %10s %hu %hu %hu %lld %lld %lld %lld %lld %lld %lld %lld %hu" + " %10s %hu %hu %hu "LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT" %hu" "%n", type, &width, &var, &properties, &nokey0, &nokey1, &nosorted, &norevsorted, &base, &align, &free, &size, &storage, &n) < 13 : sscanf(buf, - " %10s %hu %hu %hu %lld %lld %lld %lld %lld %lld %lld %hu" + " %10s %hu %hu %hu "LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT" %hu" "%n", type, &width, &var, &properties, &nokey0, &nokey1, &nosorted, &norevsorted, &base, @@ -1069,7 +1069,7 @@ vheapinit(BAT *b, const char *buf, int h if (b->tvheap == NULL) GDKfatal("BBPinit: cannot allocate memory for heap."); if (sscanf(buf, - " %lld %lld %hu" + " "LLFMT" "LLFMT" %hu" "%n", &free, &size, &storage, &n) < 3) GDKfatal("BBPinit: invalid format for BBP.dir\n%s", buf); @@ -1127,7 +1127,7 @@ BBPreadEntries(FILE *fp, int bbpversion) if (bbpversion <= GDKLIBRARY_INSERTED ? sscanf(buf, - "%lld %hu %128s %128s %128s %d %u %lld %lld %lld %lld %lld %hu %hu %hu %hu" + LLFMT" %hu %128s %128s %128s %d %u "LLFMT" "LLFMT" "LLFMT" "LLFMT" "LLFMT" %hu %hu %hu %hu" "%n", &batid, &status, headname, tailname, filename, &lastused, &properties, &inserted, &deleted, &first, @@ -1136,7 +1136,7 @@ BBPreadEntries(FILE *fp, int bbpversion) &nread) < 16 : bbpversion <= GDKLIBRARY_HEADED ? sscanf(buf, - "%lld %hu %128s %128s %128s %d %u %lld %lld %lld %hu %hu %hu %hu" + LLFMT" %hu %128s %128s %128s %d %u "LLFMT" "LLFMT" "LLFMT" %hu %hu %hu %hu" "%n", &batid, &status, headname, tailname, filename, &lastused, &properties, &first, @@ -1144,7 +1144,7 @@ BBPreadEntries(FILE *fp, int bbpversion) &map_theap, &nread) < 14 : sscanf(buf, - "%lld %hu %128s %128s %u %lld %lld %lld" + LLFMT" %hu %128s %128s %u "LLFMT" "LLFMT" "LLFMT "%n", &batid, &status, headname, filename, &properties, diff --git a/monetdb5/mal/Tests/tst1200.stable.out b/monetdb5/mal/Tests/tst1200.stable.out --- a/monetdb5/mal/Tests/tst1200.stable.out +++ b/monetdb5/mal/Tests/tst1200.stable.out @@ -115,11 +115,11 @@ Ready. [ 0@0, 0, nil, nil ] [ 1@0, 60, nil, nil ] [ 2@0, 60, nil, nil ] -[ 3@0, 60, "october 31@01:15", "first wednesday on or after march 26@01:15" ] -[ 4@0, 0, "17th monday from start of january@01:15", "31th sunday from start of august@01:15" ] -[ 5@0, -97, "october 31@01:15", "first thursday on or after april 31@01:15" ] -[ 6@0, -97, "may 26@01:15", "22th tuesday from start of september@01:15" ] -[ 7@0, 1380, "first thursday on or after april 31@01:15", "first wednesday on or after november 22@01:15" ] +[ 3@0, 60, october 31@01:15, first wednesday on or after march 26@01:15 ] +[ 4@0, 0, 17th monday from start of january@01:15, 31th sunday from start of august@01:15 ] +[ 5@0, -97, october 31@01:15, first thursday on or after april 31@01:15 ] +[ 6@0, -97, may 26@01:15, 22th tuesday from start of september@01:15 ] +[ 7@0, 1380, first thursday on or after april 31@01:15, first wednesday on or after november 22@01:15 ] [ 8@0, -1416, nil, nil ] [ 9@0, 0, nil, nil ] [ 10@0, -60, nil, nil ] @@ -164,19 +164,19 @@ Ready. # t date min100y diff # name # void date date int # type #--------------------------# -[ 0@0, "2000-01-01", "1900-01-01", -36524 ] -[ 1@0, "5000-01-01", "4900-01-01", -36524 ] -[ 2@0, "1968-02-29", "1868-02-29", -36524 ] -[ 3@0, "1-03-01", "-100-03-01", -36525 ] -[ 4@0, "-5867411-01-01", nil, nil ] -[ 5@0, "-768-10-01", "-868-10-01", -36525 ] -[ 6@0, "5000-11-01", "4900-11-01", -36524 ] -[ 7@0, "-1999-06-01", "-2099-06-01", -36525 ] -[ 8@0, "2000-07-14", "1900-07-14", -36525 ] -[ 9@0, "1999-09-01", "1899-09-01", -36524 ] -[ 10@0, "1998-12-01", "1898-12-01", -36524 ] -[ 11@0, "1953-05-01", "1853-05-01", -36524 ] -[ 12@0, "5867411-12-31", "5867311-12-31", -36524 ] +[ 0@0, 2000-01-01, 1900-01-01, -36524 ] +[ 1@0, 5000-01-01, 4900-01-01, -36524 ] +[ 2@0, 1968-02-29, 1868-02-29, -36524 ] +[ 3@0, 1-03-01, -100-03-01, -36525 ] +[ 4@0, -5867411-01-01, nil, nil ] +[ 5@0, -768-10-01, -868-10-01, -36525 ] +[ 6@0, 5000-11-01, 4900-11-01, -36524 ] +[ 7@0, -1999-06-01, -2099-06-01, -36525 ] +[ 8@0, 2000-07-14, 1900-07-14, -36525 ] +[ 9@0, 1999-09-01, 1899-09-01, -36524 ] +[ 10@0, 1998-12-01, 1898-12-01, -36524 ] +[ 11@0, 1953-05-01, 1853-05-01, -36524 ] +[ 12@0, 5867411-12-31, 5867311-12-31, -36524 ] [ 13@0, nil, nil, nil ] [ 14@0, nil, nil, nil ] [ 15@0, nil, nil, nil ] @@ -190,19 +190,19 @@ Ready. # t date plus1m diff # name # void date date int # type #--------------------------# -[ 0@0, "2000-01-01", "2000-02-01", 31 ] -[ 1@0, "5000-01-01", "5000-02-01", 31 ] -[ 2@0, "1968-02-29", "1968-03-29", 29 ] -[ 3@0, "1-03-01", "1-04-01", 31 ] -[ 4@0, "-5867411-01-01", "-5867411-02-01", 31 ] -[ 5@0, "-768-10-01", "-768-11-01", 31 ] -[ 6@0, "5000-11-01", "5000-12-01", 30 ] -[ 7@0, "-1999-06-01", "-1999-07-01", 30 ] -[ 8@0, "2000-07-14", "2000-08-14", 31 ] -[ 9@0, "1999-09-01", "1999-10-01", 30 ] -[ 10@0, "1998-12-01", "1999-01-01", 31 ] -[ 11@0, "1953-05-01", "1953-06-01", 31 ] -[ 12@0, "5867411-12-31", nil, nil ] +[ 0@0, 2000-01-01, 2000-02-01, 31 ] +[ 1@0, 5000-01-01, 5000-02-01, 31 ] +[ 2@0, 1968-02-29, 1968-03-29, 29 ] +[ 3@0, 1-03-01, 1-04-01, 31 ] +[ 4@0, -5867411-01-01, -5867411-02-01, 31 ] +[ 5@0, -768-10-01, -768-11-01, 31 ] +[ 6@0, 5000-11-01, 5000-12-01, 30 ] +[ 7@0, -1999-06-01, -1999-07-01, 30 ] +[ 8@0, 2000-07-14, 2000-08-14, 31 ] +[ 9@0, 1999-09-01, 1999-10-01, 30 ] +[ 10@0, 1998-12-01, 1999-01-01, 31 ] +[ 11@0, 1953-05-01, 1953-06-01, 31 ] +[ 12@0, 5867411-12-31, nil, nil ] [ 13@0, nil, nil, nil ] [ 14@0, nil, nil, nil ] [ 15@0, nil, nil, nil ] @@ -970,21 +970,21 @@ Ready. # t daytime hours minutes seconds milliseconds # name # void daytime int int int int # type #--------------------------# -[ 0@0, "23:59:59.999", 23, 59, 59, 999 ] -[ 1@0, "23:59:00.000", 23, 59, 0, 0 ] -[ 2@0, "00:00:00.000", 0, 0, 0, 0 ] -[ 3@0, "23:59:59.000", 23, 59, 59, 0 ] -[ 4@0, "00:00:00.000", 0, 0, 0, 0 ] -[ 5@0, "00:00:00.000", 0, 0, 0, 0 ] -[ 6@0, "00:00:00.001", 0, 0, 0, 1 ] -[ 7@0, "03:49:02.999", 3, 49, 2, 999 ] -[ 8@0, "20:48:42.999", 20, 48, 42, 999 ] -[ 9@0, "17:53:38.999", 17, 53, 38, 999 ] -[ 10@0, "13:15:34.999", 13, 15, 34, 999 ] -[ 11@0, "07:34:27.999", 7, 34, 27, 999 ] -[ 12@0, "23:59:59.999", 23, 59, 59, 999 ] -[ 13@0, "01:00:03.999", 1, 0, 3, 999 ] -[ 14@0, "23:59:59.999", 23, 59, 59, 999 ] +[ 0@0, 23:59:59.999, 23, 59, 59, 999 ] +[ 1@0, 23:59:00.000, 23, 59, 0, 0 ] +[ 2@0, 00:00:00.000, 0, 0, 0, 0 ] +[ 3@0, 23:59:59.000, 23, 59, 59, 0 ] +[ 4@0, 00:00:00.000, 0, 0, 0, 0 ] +[ 5@0, 00:00:00.000, 0, 0, 0, 0 ] +[ 6@0, 00:00:00.001, 0, 0, 0, 1 ] +[ 7@0, 03:49:02.999, 3, 49, 2, 999 ] +[ 8@0, 20:48:42.999, 20, 48, 42, 999 ] +[ 9@0, 17:53:38.999, 17, 53, 38, 999 ] +[ 10@0, 13:15:34.999, 13, 15, 34, 999 ] +[ 11@0, 07:34:27.999, 7, 34, 27, 999 ] +[ 12@0, 23:59:59.999, 23, 59, 59, 999 ] +[ 13@0, 01:00:03.999, 1, 0, 3, 999 ] +[ 14@0, 23:59:59.999, 23, 59, 59, 999 ] [ 15@0, nil, nil, nil, nil, nil ] [ 16@0, nil, nil, nil, nil, nil ] [ 17@0, nil, nil, nil, nil, nil ] @@ -1078,19 +1078,19 @@ Ready. # t timestamp plus23 min1 diff # name # void timestamp timestamp timestamp lng # type #--------------------------# -[ 0@0, "2000-01-02 00:59:59.999", "2000-01-02 23:59:59.999", "2000-01-02 00:58:59.999", 23 ] -[ 1@0, "5000-01-01 23:59:00.000", "5000-01-02 22:59:00.000", "5000-01-01 23:58:00.000", 23 ] -[ 2@0, "1968-02-29 00:00:00.000", "1968-02-29 23:00:00.000", "1968-02-28 23:59:00.000", 23 ] -[ 3@0, "1-03-01 22:59:59.000", "1-03-02 21:59:59.000", "1-03-01 22:58:59.000", 23 ] -[ 4@0, "-5867411-01-01 01:00:00.000", "-5867411-01-02 00:00:00.000", nil, nil ] -[ 5@0, "-768-10-01 02:37:00.000", "-768-10-02 01:37:00.000", "-768-10-01 02:36:00.000", 23 ] -[ 6@0, "5000-11-01 01:37:00.001", "5000-11-02 00:37:00.001", "5000-11-01 01:36:00.001", 23 ] -[ 7@0, "-1999-05-31 04:49:02.999", "-1999-06-01 03:49:02.999", "-1999-05-31 04:48:02.999", 23 ] -[ 8@0, "2000-07-15 21:24:42.999", "2000-07-16 20:24:42.999", "2000-07-15 21:23:42.999", 23 ] -[ 9@0, "1999-09-01 18:53:38.999", "1999-09-02 17:53:38.999", "1999-09-01 18:52:38.999", 23 ] -[ 10@0, "1998-12-01 15:15:34.999", "1998-12-02 14:15:34.999", "1998-12-01 15:14:34.999", 23 ] -[ 11@0, "1953-04-30 08:35:27.999", "1953-05-01 07:35:27.999", "1953-04-30 08:34:27.999", 23 ] -[ 12@0, "5867411-12-31 23:59:59.999", nil, "5867411-12-31 23:58:59.999", nil ] +[ 0@0, 2000-01-02 00:59:59.999, 2000-01-02 23:59:59.999, 2000-01-02 00:58:59.999, 23 ] +[ 1@0, 5000-01-01 23:59:00.000, 5000-01-02 22:59:00.000, 5000-01-01 23:58:00.000, 23 ] +[ 2@0, 1968-02-29 00:00:00.000, 1968-02-29 23:00:00.000, 1968-02-28 23:59:00.000, 23 ] +[ 3@0, 1-03-01 22:59:59.000, 1-03-02 21:59:59.000, 1-03-01 22:58:59.000, 23 ] +[ 4@0, -5867411-01-01 01:00:00.000, -5867411-01-02 00:00:00.000, nil, nil ] +[ 5@0, -768-10-01 02:37:00.000, -768-10-02 01:37:00.000, -768-10-01 02:36:00.000, 23 ] +[ 6@0, 5000-11-01 01:37:00.001, 5000-11-02 00:37:00.001, 5000-11-01 01:36:00.001, 23 ] +[ 7@0, -1999-05-31 04:49:02.999, -1999-06-01 03:49:02.999, -1999-05-31 04:48:02.999, 23 ] +[ 8@0, 2000-07-15 21:24:42.999, 2000-07-16 20:24:42.999, 2000-07-15 21:23:42.999, 23 ] +[ 9@0, 1999-09-01 18:53:38.999, 1999-09-02 17:53:38.999, 1999-09-01 18:52:38.999, 23 ] +[ 10@0, 1998-12-01 15:15:34.999, 1998-12-02 14:15:34.999, 1998-12-01 15:14:34.999, 23 ] +[ 11@0, 1953-04-30 08:35:27.999, 1953-05-01 07:35:27.999, 1953-04-30 08:34:27.999, 23 ] +[ 12@0, 5867411-12-31 23:59:59.999, nil, 5867411-12-31 23:58:59.999, nil ] [ 13@0, nil, nil, nil, nil ] [ 14@0, nil, nil, nil, nil ] [ 15@0, nil, nil, nil, nil ] diff --git a/monetdb5/mal/Tests/tst1203.stable.out b/monetdb5/mal/Tests/tst1203.stable.out --- a/monetdb5/mal/Tests/tst1203.stable.out +++ b/monetdb5/mal/Tests/tst1203.stable.out @@ -60,19 +60,19 @@ Ready. # t date min100y diff # name # void date date int # type #--------------------------# -[ 0@0, "2000-01-01", "1900-01-01", -36524 ] -[ 1@0, "5000-01-01", "4900-01-01", -36524 ] -[ 2@0, "1968-02-29", "1868-02-29", -36524 ] -[ 3@0, "1-03-01", "-100-03-01", -36525 ] -[ 4@0, "-5867411-01-01", nil, nil ] -[ 5@0, "-768-10-01", "-868-10-01", -36525 ] _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list