Changeset: 806358d956a4 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=806358d956a4 Modified Files: gdk/gdk_hash.c gdk/gdk_imprints.c sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.sql sql/test/BugTracker-2011/Tests/count-count-distinct.Bug-2808.sql sql/test/BugTracker-2012/Tests/aggregate_vs_positional_column_crash.Bug-3085.sql sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.sql sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.stable.out sql/test/BugTracker-2013/Tests/qualified_aggrname.Bug-3332.sql sql/test/BugTracker-2013/Tests/qualified_aggrname.Bug-3332.stable.out sql/test/BugTracker-2013/Tests/swapped_likejoin.Bug-3375.sql sql/test/BugTracker-2013/Tests/swapped_likejoin.Bug-3375.stable.out sql/test/BugTracker-2014/Tests/select-having.Bug-3458.sql sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.sql sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.stable.out sql/test/bugs/Tests/crash_order_by.sql sql/test/bugs/Tests/simple_view.sql sql/test/bugs/insert_delete-bug-sf-904025.sql Branch: Jul2017 Log Message:
Merge with Dec2016 branch. diffs (truncated from 337 to 300 lines): diff --git a/gdk/gdk_hash.c b/gdk/gdk_hash.c --- a/gdk/gdk_hash.c +++ b/gdk/gdk_hash.c @@ -202,17 +202,16 @@ BATcheckhash(BAT *b) Hash *h; Heap *hp; const char *nme = BBP_physical(b->batCacheid); - const char *ext = b->batCacheid > 0 ? "thash" : "hhash"; int fd; b->thash = NULL; if ((hp = GDKzalloc(sizeof(*hp))) != NULL && (hp->farmid = BBPselectfarm(b->batRole, b->ttype, hashheap)) >= 0 && (hp->filename = GDKmalloc(strlen(nme) + 12)) != NULL) { - sprintf(hp->filename, "%s.%s", nme, ext); + sprintf(hp->filename, "%s.thash", nme); /* check whether a persisted hash can be found */ - if ((fd = GDKfdlocate(hp->farmid, nme, "rb+", ext)) >= 0) { + if ((fd = GDKfdlocate(hp->farmid, nme, "rb+", "thash")) >= 0) { size_t hdata[HASH_HEADER_SIZE]; struct stat st; @@ -226,7 +225,7 @@ BATcheckhash(BAT *b) hdata[4] == (size_t) BATcount(b) && fstat(fd, &st) == 0 && st.st_size >= (off_t) (hp->size = hp->free = (hdata[1] + hdata[2]) * hdata[3] + HASH_HEADER_SIZE * SIZEOF_SIZE_T) && - HEAPload(hp, nme, ext, 0) == GDK_SUCCEED) { + HEAPload(hp, nme, "thash", 0) == GDK_SUCCEED) { h->lim = (BUN) hdata[1]; h->type = ATOMtype(b->ttype); h->mask = (BUN) (hdata[2] - 1); @@ -260,7 +259,7 @@ BATcheckhash(BAT *b) GDKfree(h); close(fd); /* unlink unusable file */ - GDKunlink(hp->farmid, BATDIR, nme, ext); + GDKunlink(hp->farmid, BATDIR, nme, "thash"); } GDKfree(hp->filename); } @@ -338,7 +337,6 @@ BAThash(BAT *b, BUN masksize) Hash *h = NULL; Heap *hp; const char *nme = BBP_physical(b->batCacheid); - const char *ext = b->batCacheid > 0 ? "thash" : "hhash"; BATiter bi = bat_iterator(b); ALGODEBUG fprintf(stderr, "#BAThash: create hash(%s#" BUNFMT ");\n", BATgetId(b), BATcount(b)); @@ -350,7 +348,7 @@ BAThash(BAT *b, BUN masksize) return GDK_FAIL; } hp->dirty = TRUE; - sprintf(hp->filename, "%s.%s", nme, ext); + sprintf(hp->filename, "%s.thash", nme); /* cnt = 0, hopefully there is a proper capacity from * which we can derive enough information */ diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c --- a/gdk/gdk_imprints.c +++ b/gdk/gdk_imprints.c @@ -208,7 +208,6 @@ BATcheckimprints(BAT *b) Imprints *imprints; Heap *hp; str nme = BBP_physical(b->batCacheid); - const char *ext = b->batCacheid > 0 ? "timprints" : "himprints"; b->timprints = NULL; if ((hp = GDKzalloc(sizeof(Heap))) != NULL && @@ -216,10 +215,10 @@ BATcheckimprints(BAT *b) (hp->filename = GDKmalloc(strlen(nme) + 12)) != NULL) { int fd; - sprintf(hp->filename, "%s.%s", nme, ext); + sprintf(hp->filename, "%s.timprints", nme); /* check whether a persisted imprints index * can be found */ - if ((fd = GDKfdlocate(hp->farmid, nme, "rb", ext)) >= 0) { + if ((fd = GDKfdlocate(hp->farmid, nme, "rb", "timprints")) >= 0) { size_t hdata[4]; struct stat st; size_t pages; @@ -240,7 +239,7 @@ BATcheckimprints(BAT *b) hdata[2] * sizeof(cchdc_t) + sizeof(uint64_t) /* padding for alignment */ + 4 * SIZEOF_SIZE_T) && - HEAPload(hp, nme, b->batCacheid > 0 ? "timprints" : "himprints", 0) == GDK_SUCCEED) { + HEAPload(hp, nme, "timprints", 0) == GDK_SUCCEED) { /* usable */ imprints->imprints = hp; imprints->bits = (bte) (hdata[0] & 0xFF); @@ -261,7 +260,7 @@ BATcheckimprints(BAT *b) GDKfree(imprints); close(fd); /* unlink unusable file */ - GDKunlink(hp->farmid, BATDIR, nme, ext); + GDKunlink(hp->farmid, BATDIR, nme, "timprints"); } GDKfree(hp->filename); } @@ -342,8 +341,7 @@ BATimprints(BAT *b) MT_lock_unset(&GDKimprintsLock(b->batCacheid)); return GDK_FAIL; } - sprintf(imprints->imprints->filename, "%s.%cimprints", nme, - b->batCacheid > 0 ? 't' : 'h'); + sprintf(imprints->imprints->filename, "%s.timprints", nme); pages = (((size_t) BATcount(b) * b->twidth) + IMPS_PAGE - 1) / IMPS_PAGE; imprints->imprints->farmid = BBPselectfarm(b->batRole, b->ttype, imprintsheap); @@ -472,9 +470,9 @@ BATimprints(BAT *b) ((size_t *) imprints->imprints->base)[2] = (size_t) imprints->dictcnt; ((size_t *) imprints->imprints->base)[3] = (size_t) BATcount(b); if ((BBP_status(b->batCacheid) & BBPEXISTING) && - HEAPsave(imprints->imprints, nme, b->batCacheid > 0 ? "timprints" : "himprints") == GDK_SUCCEED && + HEAPsave(imprints->imprints, nme, "timprints") == GDK_SUCCEED && (fd = GDKfdlocate(imprints->imprints->farmid, nme, "rb+", - b->batCacheid > 0 ? "timprints" : "himprints")) >= 0) { + "timprints")) >= 0) { ALGODEBUG fprintf(stderr, "#BATimprints: persisting imprints\n"); /* add version number */ ((size_t *) imprints->imprints->base)[0] |= (size_t) IMPRINTS_VERSION << 8; @@ -610,7 +608,7 @@ IMPSremove(BAT *b) * (size_t *) imprints->imprints->base & (1 << 16)) fprintf(stderr, "#IMPSremove: removing persisted imprints\n"); if (HEAPdelete(imprints->imprints, BBP_physical(b->batCacheid), - b->batCacheid > 0 ? "timprints" : "himprints")) + "timprints")) IODEBUG fprintf(stderr, "#IMPSremove(%s): imprints heap\n", BATgetId(b)); GDKfree(imprints->imprints); diff --git a/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.sql b/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.sql --- a/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.sql +++ b/sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.sql @@ -47,7 +47,7 @@ 5717 "queue" 2000 "create view sys.queue 6368 "storage" 2000 "create view sys.storage as select * from sys.storage();" 1 true 0 false 0 6380 "storagemodelinput" 2000 NULL 0 true 0 false 0 6428 "storagemodel" 2000 "create view sys.storagemodel as select * from sys.storagemodel();" 1 true 0 false 0 -6438 "tablestoragemodel" 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum("imprints") as "imprints",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 false 0 +6438 "tablestoragemodel" 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum(""imprints"") as ""imprints"",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 false 0 6453 "statistics" 2000 NULL 0 true 0 false 0 6616 "systemfunctions" 2000 NULL 0 true 0 false 0 diff --git a/sql/test/BugTracker-2011/Tests/count-count-distinct.Bug-2808.sql b/sql/test/BugTracker-2011/Tests/count-count-distinct.Bug-2808.sql --- a/sql/test/BugTracker-2011/Tests/count-count-distinct.Bug-2808.sql +++ b/sql/test/BugTracker-2011/Tests/count-count-distinct.Bug-2808.sql @@ -47,7 +47,7 @@ 5717 "queue" 2000 "create view sys.queue 6368 "storage" 2000 "create view sys.storage as select * from sys.storage();" 1 true 0 false 0 6380 "storagemodelinput" 2000 NULL 0 true 0 false 0 6428 "storagemodel" 2000 "create view sys.storagemodel as select * from sys.storagemodel();" 1 true 0 false 0 -6438 "tablestoragemodel" 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum("imprints") as "imprints",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 false 0 +6438 "tablestoragemodel" 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum(""imprints"") as ""imprints"",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 false 0 6453 "statistics" 2000 NULL 0 true 0 false 0 6616 "systemfunctions" 2000 NULL 0 true 0 false 0 diff --git a/sql/test/BugTracker-2012/Tests/aggregate_vs_positional_column_crash.Bug-3085.sql b/sql/test/BugTracker-2012/Tests/aggregate_vs_positional_column_crash.Bug-3085.sql --- a/sql/test/BugTracker-2012/Tests/aggregate_vs_positional_column_crash.Bug-3085.sql +++ b/sql/test/BugTracker-2012/Tests/aggregate_vs_positional_column_crash.Bug-3085.sql @@ -47,7 +47,7 @@ 5717 "queue" 2000 "create view sys.queue 6368 "storage" 2000 "create view sys.storage as select * from sys.storage();" 1 true 0 false 0 6380 "storagemodelinput" 2000 NULL 0 true 0 false 0 6428 "storagemodel" 2000 "create view sys.storagemodel as select * from sys.storagemodel();" 1 true 0 false 0 -6438 "tablestoragemodel" 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum("imprints") as "imprints",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 false 0 +6438 "tablestoragemodel" 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum(""imprints"") as ""imprints"",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 false 0 6453 "statistics" 2000 NULL 0 true 0 false 0 6616 "systemfunctions" 2000 NULL 0 true 0 false 0 diff --git a/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.sql b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.sql --- a/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.sql +++ b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.sql @@ -47,7 +47,7 @@ 5717 "queue" 2000 "create view sys.queue 6368 "storage" 2000 "create view sys.storage as select * from sys.storage();" 1 true 0 false 0 6380 "storagemodelinput" 2000 NULL 0 true 0 false 0 6428 "storagemodel" 2000 "create view sys.storagemodel as select * from sys.storagemodel();" 1 true 0 false 0 -6438 "tablestoragemodel" 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum("imprints") as "imprints",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 false 0 +6438 "tablestoragemodel" 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum(""imprints"") as ""imprints"",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 false 0 6453 "statistics" 2000 NULL 0 true 0 false 0 6616 "systemfunctions" 2000 NULL 0 true 0 false 0 diff --git a/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.stable.out b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.stable.out --- a/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.stable.out +++ b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090.stable.out @@ -51,7 +51,7 @@ Ready. % sys.tbls, sys.tbls, sys.tbls, sys.tbls, sys.tbls, sys.tbls, sys.tbls, sys.tbls # table_name % name, schema_id, query, type, system, commit_action, readonly, temporary # name % varchar, int, varchar, smallint, boolean, smallint, boolean, smallint # type -% 17, 4, 379, 1, 5, 1, 5, 1 # length +% 17, 4, 526, 1, 5, 1, 5, 1 # length [ "schemas", 2000, NULL, 0, true, 0, false, 0 ] [ "types", 2000, NULL, 0, true, 0, false, 0 ] [ "functions", 2000, NULL, 0, true, 0, false, 0 ] @@ -89,7 +89,7 @@ Ready. [ "storage", 2000, "create view sys.storage as select * from sys.storage();", 1, true, 0, false, 0 ] [ "storagemodelinput", 2000, NULL, 0, true, 0, false, 0 ] [ "storagemodel", 2000, "create view sys.storagemodel as select * from sys.storagemodel();", 1, true, 0, false, 0 ] -[ "tablestoragemodel", 2000, "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select \"schema\",\"table\",max(count) as \"count\",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum(", 1, true, 0, false, 0 ] +[ "tablestoragemodel", 2000, "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select \"schema\",\"table\",max(count) as \"count\",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum(\"imprints\") as \"imprints\",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by \"schema\",\"table\";", 1, true, 0, false, 0 ] [ "statistics", 2000, NULL, 0, true, 0, false, 0 ] [ "systemfunctions", 2000, NULL, 0, true, 0, false, 0 ] diff --git a/sql/test/BugTracker-2013/Tests/qualified_aggrname.Bug-3332.sql b/sql/test/BugTracker-2013/Tests/qualified_aggrname.Bug-3332.sql --- a/sql/test/BugTracker-2013/Tests/qualified_aggrname.Bug-3332.sql +++ b/sql/test/BugTracker-2013/Tests/qualified_aggrname.Bug-3332.sql @@ -47,7 +47,7 @@ 5717 "queue" 2000 "create view sys.queue 6368 "storage" 2000 "create view sys.storage as select * from sys.storage();" 1 true 0 false 0 6380 "storagemodelinput" 2000 NULL 0 true 0 false 0 6428 "storagemodel" 2000 "create view sys.storagemodel as select * from sys.storagemodel();" 1 true 0 false 0 -6438 "tablestoragemodel" 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum("imprints") as "imprints",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 false 0 +6438 "tablestoragemodel" 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum(""imprints"") as ""imprints"",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 false 0 6453 "statistics" 2000 NULL 0 true 0 false 0 6616 "systemfunctions" 2000 NULL 0 true 0 false 0 diff --git a/sql/test/BugTracker-2013/Tests/qualified_aggrname.Bug-3332.stable.out b/sql/test/BugTracker-2013/Tests/qualified_aggrname.Bug-3332.stable.out --- a/sql/test/BugTracker-2013/Tests/qualified_aggrname.Bug-3332.stable.out +++ b/sql/test/BugTracker-2013/Tests/qualified_aggrname.Bug-3332.stable.out @@ -50,8 +50,8 @@ Ready. #2086 "idxs" 2000 NULL 0 true 0 false 0 [ 40 ] #select sys.median(cast (id as double)) from tbls; -% sys.L3 # table_name -% L2 # name +% sys.L5 # table_name +% L4 # name % double # type % 24 # length [ 5183 ] diff --git a/sql/test/BugTracker-2013/Tests/swapped_likejoin.Bug-3375.sql b/sql/test/BugTracker-2013/Tests/swapped_likejoin.Bug-3375.sql --- a/sql/test/BugTracker-2013/Tests/swapped_likejoin.Bug-3375.sql +++ b/sql/test/BugTracker-2013/Tests/swapped_likejoin.Bug-3375.sql @@ -55,7 +55,7 @@ 6995 netcdf_attrs 2000 0 true 0 0 7034 storage 2000 "create view sys.""storage"" as select * from sys.""storage""();" 1 true 0 0 7046 storagemodelinput 2000 0 true 0 0 7094 storagemodel 2000 "create view sys.storagemodel as select * from sys.storagemodel();" 1 true 0 0 -7104 tablestoragemodel 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum("imprints") as "imprints",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 0 +7104 tablestoragemodel 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum(""imprints"") as ""imprints"",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 0 7117 statistics 2000 0 true 0 0 7245 systemfunctions 2000 0 true 0 0 diff --git a/sql/test/BugTracker-2013/Tests/swapped_likejoin.Bug-3375.stable.out b/sql/test/BugTracker-2013/Tests/swapped_likejoin.Bug-3375.stable.out --- a/sql/test/BugTracker-2013/Tests/swapped_likejoin.Bug-3375.stable.out +++ b/sql/test/BugTracker-2013/Tests/swapped_likejoin.Bug-3375.stable.out @@ -59,12 +59,12 @@ Ready. % sys.tbls, sys.tbls, sys.tbls, sys.tbls, sys.tbls, sys.tbls, sys.tbls, sys.x # table_name % name, schema_id, query, type, system, commit_action, access, s # name % varchar, int, varchar, smallint, boolean, smallint, smallint, clob # type -% 17, 4, 433, 1, 5, 1, 1, 6 # length +% 17, 4, 526, 1, 5, 1, 1, 6 # length [ "_tables", 2000, "", 0, true, 0, 0, "%able%" ] [ "_tables", 2106, "", 0, true, 2, 0, "%able%" ] [ "tables", 2000, "SELECT * FROM (SELECT p.*, 0 AS \"temporary\", CAST(CASE WHEN system THEN type + 10 /* system table/view */ ELSE (CASE WHEN commit_action = 0 THEN type /* table/view */ ELSE type + 20 /* global temp table */ END) END AS SMALLINT) AS table_type FROM \"sys\".\"_tables\" AS p UNION ALL SELECT t.*, 1 AS \"temporary\", CAST(type + 30 /* local temp table */ AS SMALLINT) AS table_type FROM \"tmp\".\"_tables\" AS t) AS tables where tables.type <> 2;", 1, true, 0, 0, "%able%" ] [ "table_types", 2000, "", 0, true, 0, 0, "%able%" ] -[ "tablestoragemodel", 2000, "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select \"schema\",\"table\",max(count) as \"count\",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum(", 1, true, 0, 0, "%able%" ] +[ "tablestoragemodel", 2000, "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select \"schema\",\"table\",max(count) as \"count\",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum(\"imprints\") as \"imprints\",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by \"schema\",\"table\";", 1, true, 0, 0, "%able%" ] #drop table x; # 10:06:32 > diff --git a/sql/test/BugTracker-2014/Tests/select-having.Bug-3458.sql b/sql/test/BugTracker-2014/Tests/select-having.Bug-3458.sql --- a/sql/test/BugTracker-2014/Tests/select-having.Bug-3458.sql +++ b/sql/test/BugTracker-2014/Tests/select-having.Bug-3458.sql @@ -47,7 +47,7 @@ 5717 "queue" 2000 "create view sys.queue 6368 "storage" 2000 "create view sys.storage as select * from sys.storage();" 1 true 0 false 0 6380 "storagemodelinput" 2000 NULL 0 true 0 false 0 6428 "storagemodel" 2000 "create view sys.storagemodel as select * from sys.storagemodel();" 1 true 0 false 0 -6438 "tablestoragemodel" 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum("imprints") as "imprints",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 false 0 +6438 "tablestoragemodel" 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum(""imprints"") as ""imprints"",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 1 true 0 false 0 6453 "statistics" 2000 NULL 0 true 0 false 0 6616 "systemfunctions" 2000 NULL 0 true 0 false 0 diff --git a/sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.sql b/sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.sql --- a/sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.sql +++ b/sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.sql @@ -56,7 +56,7 @@ 7007 netcdf_attrs 2000 10 true 0 0 0 7046 storage 2000 "create view sys.""storage"" as select * from sys.""storage""();" 11 true 0 0 0 7058 storagemodelinput 2000 10 true 0 0 0 7106 storagemodel 2000 create view sys.storagemodel as select * from sys.storagemodel(); 11 true 0 0 0 -7116 tablestoragemodel 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum("imprints") as "imprints",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 11 true 0 0 0 +7116 tablestoragemodel 2000 "-- A summary of the table storage requirement is is available as a table view.\n-- The auxiliary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select ""schema"",""table"",max(count) as ""count"",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(hashes) as hashes,\n\tsum(""imprints"") as ""imprints"",\n\tsum(case when sorted = false then 8 * count else 0 end) as auxiliary\nfrom sys.storagemodel() group by ""schema"",""table"";" 11 true 0 0 0 7129 statistics 2000 10 true 0 0 0 7227 files 7176 10 true 0 0 0 7240 sq 7176 10 true 0 0 0 diff --git a/sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.stable.out b/sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.stable.out --- a/sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.stable.out +++ b/sql/test/BugTracker-2015/Tests/cardinality.Bug-3761.stable.out @@ -70,7 +70,7 @@ Ready. #7176 "bam" 3 3 true [ 4 ] #SELECT NULL AS table_catalog, (SELECT s.name FROM schms s WHERE t.schema_id = s.id) AS table_schema FROM tbls t ORDER BY table_schema; -% .L1, .L4 # table_name +% .L2, .L11 # table_name % table_catalog, table_schema # name % char, varchar # type % 0, 3 # length @@ -129,7 +129,7 @@ Ready. [ NULL, "tmp" ] [ NULL, "tmp" ] #SELECT (SELECT s.name FROM schms s WHERE t.schema_id = s.id) AS table_schema, NULL AS table_catalog FROM tbls t ORDER BY table_schema; -% .L3, .L4 # table_name +% .L6, .L10 # table_name % table_schema, table_catalog # name % varchar, char # type _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list