MonetDB: nospare - add more cleanup code
Changeset: c407221194c6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c407221194c6 Modified Files: sql/common/sql_list.c sql/include/sql_catalog.h sql/include/sql_list.h sql/server/sql_partition.c sql/storage/bat/bat_storage.c sql/storage/objectset.c sql/storage/store.c Branch: nospare Log Message: add more cleanup code diffs (truncated from 682 to 300 lines): diff --git a/sql/common/sql_list.c b/sql/common/sql_list.c --- a/sql/common/sql_list.c +++ b/sql/common/sql_list.c @@ -774,21 +774,6 @@ list_flaten(list *l) } void -list_update_data(list *l, node *n, void *data) -{ - MT_lock_set(&l->ht_lock); - if (l->ht) { - hash_delete(l->ht, n->data); - n->data = data; - int nkey = l->ht->key(data); - hash_add(l->ht, nkey, data); - } else { - n->data = data; - } - MT_lock_unset(&l->ht_lock); -} - -void list_hash_delete(list *l, void *data, fcmp cmp) { if (l && data) { diff --git a/sql/include/sql_catalog.h b/sql/include/sql_catalog.h --- a/sql/include/sql_catalog.h +++ b/sql/include/sql_catalog.h @@ -543,7 +543,6 @@ typedef struct sql_idx { struct list *columns; /* list of sql_kc */ struct sql_table *t; struct sql_key *key;/* key */ - struct sql_idx *po; /* the outer transactions idx */ void *data; } sql_idx; @@ -614,7 +613,6 @@ typedef struct sql_column { char *max; struct sql_table *t; - struct sql_column *po; /* the outer transactions column */ void *data; } sql_column; @@ -699,7 +697,6 @@ typedef struct sql_table { void *data; struct sql_schema *s; - struct sql_table *po; /* the outer transactions table */ union { struct sql_column *pcol; /* If it is partitioned on a column */ diff --git a/sql/include/sql_list.h b/sql/include/sql_list.h --- a/sql/include/sql_list.h +++ b/sql/include/sql_list.h @@ -103,6 +103,5 @@ extern list *list_flaten(list *l); extern void list_hash_delete(list *l, void *data, fcmp cmp); extern void* list_hash_add(list *l, void *data, fcmp cmp); extern void list_hash_clear(list *l); -extern void list_update_data(list *l, node *n, void *data); #endif /* LIST_H */ diff --git a/sql/server/sql_partition.c b/sql/server/sql_partition.c --- a/sql/server/sql_partition.c +++ b/sql/server/sql_partition.c @@ -318,8 +318,6 @@ initialize_sql_parts(mvc *sql, sql_table find_partition_type(&found, mt); localtype = found.type->localtype; - if (isPartitionedByExpressionTable(mt)) /* Propagate type to outer transaction table */ - mt->po->part.pexp->type = mt->part.pexp->type; if (localtype != TYPE_str && mt->members.set && cs_size(&mt->members)) { list *new = sa_list(tr->sa), *old = sa_list(tr->sa); diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c --- a/sql/storage/bat/bat_storage.c +++ b/sql/storage/bat/bat_storage.c @@ -1296,9 +1296,6 @@ sorted_col(sql_trans *tr, sql_column *co assert(tr->active); if (!isTable(col->t) || !col->t->s) return 0; - /* fallback to central bat */ - if (tr && tr->parent && !col->data && col->po) - col = col->po; if (col && col->data) { BAT *b = bind_col(tr, col, QUICK); @@ -1317,9 +1314,6 @@ unique_col(sql_trans *tr, sql_column *co assert(tr->active); if (!isTable(col->t) || !col->t->s) return 0; - /* fallback to central bat */ - if (tr && tr->parent && !col->data && col->po) - col = col->po; if (col && col->data) { BAT *b = bind_col(tr, col, QUICK); @@ -1338,9 +1332,6 @@ double_elim_col(sql_trans *tr, sql_colum assert(tr->active); if (!isTable(col->t) || !col->t->s) return 0; - /* fallback to central bat */ - if (tr && tr->parent && !col->data && col->po) - col = col->po; if (col && col->data) { BAT *b = bind_col(tr, col, QUICK); diff --git a/sql/storage/objectset.c b/sql/storage/objectset.c --- a/sql/storage/objectset.c +++ b/sql/storage/objectset.c @@ -137,14 +137,15 @@ hash_delete(sql_hash *h, void *data) } static void -node_destroy(objectset *os, object_node *n) +node_destroy(objectset *os, sqlstore *store, object_node *n) { if (!os->sa) _DELETE(n); + (void)store; /* todo destroy obj */ } static object_node * -os_remove_name_based_chain(objectset *os, object_node *n) +os_remove_name_based_chain(objectset *os, sqlstore *store, object_node *n) { assert(n); object_node *p = os->name_based_h; @@ -171,12 +172,12 @@ os_remove_name_based_chain(objectset *os hash_delete(os->name_map, n); MT_lock_unset(&os->ht_lock); - node_
MonetDB: nospare - Separate objet_node into name and id based ve...
Changeset: 278df79adbde for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=278df79adbde Modified Files: sql/storage/objectset.c Branch: nospare Log Message: Separate objet_node into name and id based version chain types. diffs (truncated from 903 to 300 lines): diff --git a/sql/storage/objectset.c b/sql/storage/objectset.c --- a/sql/storage/objectset.c +++ b/sql/storage/objectset.c @@ -18,15 +18,23 @@ * keep hash/map of names -> objectversion */ -struct object_node; +struct object_node;// TODO: rename to object_version_chain + +#define id_based_rollbacked 1 +#define name_based_rollbacked (1<<1) typedef struct objectversion { bool deleted; ulng ts; + bte rollbacked; sql_base *obj; - struct objectversion *older; - struct objectversion *newer; - struct object_node *on; + struct objectversion*name_based_older; + struct objectversion*name_based_newer; // TODO: must become atomic pointer + struct object_node *name_based_chain; + + struct objectversion*id_based_older; + struct objectversion*id_based_newer; + struct object_node *id_based_chain; } objectversion; typedef struct object_node { @@ -41,9 +49,12 @@ typedef struct objectset { sql_allocator *sa; destroy_fptr destroy; MT_Lock ht_lock;/* latch protecting ht */ - object_node *h; - object_node *t; - int cnt; + object_node *name_based_h; + object_node *name_based_t; + object_node *id_based_h; + object_node *id_based_t; + int name_based_cnt; + int id_based_cnt; struct sql_hash *name_map; struct sql_hash *id_map; bool temporary; @@ -61,15 +72,15 @@ find_id(objectset *os, sqlid id) { if (os) { MT_lock_set(&os->ht_lock); - if ((!os->id_map || os->id_map->size*16 < os->cnt) && os->cnt > HASH_MIN_SIZE && os->sa) { + if ((!os->id_map || os->id_map->size*16 < os->id_based_cnt) && os->id_based_cnt > HASH_MIN_SIZE && os->sa) { // TODO: This leaks the old map - os->id_map = hash_new(os->sa, os->cnt, (fkeyvalue)&os_id_key); + os->id_map = hash_new(os->sa, os->id_based_cnt, (fkeyvalue)&os_id_key); if (os->id_map == NULL) { MT_lock_unset(&os->ht_lock); return NULL; } - for (object_node *n = os->h; n; n = n->next ) { + for (object_node *n = os->id_based_h; n; n = n->next ) { int key = os_id_key(n); if (hash_add(os->id_map, key, n) == NULL) { @@ -95,7 +106,7 @@ find_id(objectset *os, sqlid id) } MT_lock_unset(&os->ht_lock); // TODO: can we actually reach this point? - for (object_node *n = os->h; n; n = n->next) { + for (object_node *n = os->id_based_h; n; n = n->next) { objectversion *ov = n->data; /* check if ids match */ @@ -128,47 +139,70 @@ hash_delete(sql_hash *h, void *data) static void node_destroy(objectset *os, object_node *n) { - if (n->data && os->destroy) { - os->destroy(n->data, NULL); - n->data = NULL; - } if (!os->sa) _DELETE(n); } static object_node * -os_remove_node(objectset *os, object_node *n) +os_remove_name_based_chain(objectset *os, object_node *n) { assert(n); - object_node *p = os->h; + object_node *p = os->name_based_h; if (p != n) while (p && p->next != n) p = p->next; assert(p==n||(p && p->next == n)); if (p == n) { - os->h = n->next; - if (os->h) // i.e. non-empty os - os->h->prev = NULL; + os->name_based_h = n->next; + if (os->name_based_h) // i.e. non-empty os + os->name_based_h->prev = NULL; p = NULL; } else if ( p != NULL) { p->next = n->next; if (p->next) // node in the middle p->next->prev = p; } - if (n == os->t) - os->t = p; + if (n == os->name_based_t) + os->name_based_t = p; + + MT_lock_set(&os->ht_lock); + if (os->name_map && n) + hash_delete(os->name_map, n); + MT_lock_unset(&os->ht_lock); + + node_destroy(os, n); + return p; +} + +static object_node * +os_remove_id_based_chain(objectset *os, object_node *n) +{ + assert(n); + object_node *p = os->id_based_h; + + if (p != n) + while (p && p->next != n) + p = p->next; +
MonetDB: Oct2020 - SQLancer crash on drop column cascade
Changeset: f4e360ee94c6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f4e360ee94c6 Modified Files: sql/test/SQLancer/Tests/sqlancer02.sql Branch: Oct2020 Log Message: SQLancer crash on drop column cascade diffs (11 lines): diff --git a/sql/test/SQLancer/Tests/sqlancer02.sql b/sql/test/SQLancer/Tests/sqlancer02.sql --- a/sql/test/SQLancer/Tests/sqlancer02.sql +++ b/sql/test/SQLancer/Tests/sqlancer02.sql @@ -313,3 +313,7 @@ SELECT ALL t1.c0 FROM t1, t2 CROSS JOIN EXCEPT (SELECT ALL ((CASE 0.1 WHEN 0.2 THEN t2.c2 END)>(greatest(t2.c2, t2.c0))) FROM t2)) AS sub0 WHERE (3.0) IS NOT NULL; --error ROLLBACK; + +CREATE TABLE t0(c0 int AUTO_INCREMENT,c1 STRING); +ALTER TABLE t0 DROP c0 CASCADE; +DROP TABLE t0; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Oct2020 - The bug was from SQLancer. For except/interse...
Changeset: 2f40306e6252 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2f40306e6252 Modified Files: sql/server/rel_exp.c sql/test/SQLancer/Tests/sqlancer02.sql sql/test/SQLancer/Tests/sqlancer02.stable.err sql/test/SQLancer/Tests/sqlancer02.stable.out Branch: Oct2020 Log Message: The bug was from SQLancer. For except/intersect/union without corresponding word, distinct should be used instead of all. Sorry for the mistake, but I was able to find the 'has_label' check was not enough to detect if the column name was generated. diffs (truncated from 1017 to 300 lines): diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c --- a/sql/server/rel_exp.c +++ b/sql/server/rel_exp.c @@ -2955,6 +2955,7 @@ exp_check_type(mvc *sql, sql_subtype *t, } } if (err) { + const char *name = (exp->type == e_column && !has_label(exp)) ? exp_name(exp) : "%"; sql_exp *res = sql_error( sql, 03, SQLSTATE(42000) "types %s(%u,%u) and %s(%u,%u) are not equal%s%s%s", fromtype->type->sqlname, fromtype->digits, @@ -2962,9 +2963,9 @@ exp_check_type(mvc *sql, sql_subtype *t, t->type->sqlname, t->digits, t->scale, - (exp->type == e_column && !has_label(exp) ? " for column '" : ""), - (exp->type == e_column && !has_label(exp) ? exp_name(exp) : ""), - (exp->type == e_column && !has_label(exp) ? "'" : "") + (name[0] != '%' ? " for column '" : ""), + (name[0] != '%' ? name : ""), + (name[0] != '%' ? "'" : "") ); return res; } diff --git a/sql/test/SQLancer/Tests/sqlancer02.sql b/sql/test/SQLancer/Tests/sqlancer02.sql --- a/sql/test/SQLancer/Tests/sqlancer02.sql +++ b/sql/test/SQLancer/Tests/sqlancer02.sql @@ -291,7 +291,7 @@ 0.38681017904242443 NULLNULL -4.411138449465319 NULLNULL SELECT ALL t1.c0 FROM t1, t2 CROSS JOIN ((SELECT "isauuid"(COALESCE(t2.c1, t2.c1)) FROM t2 WHERE ((TRUE)AND(TRUE)))OR -(TRUE)))OR(TRUE)))OR(FALSE)))AND(TRUE))) EXCEPT (SELECT ALL ((CASE 0.54967607103225102349597364082001149654388427734375 +(TRUE)))OR(TRUE)))OR(FALSE)))AND(TRUE))) EXCEPT ALL (SELECT ALL ((CASE 0.54967607103225102349597364082001149654388427734375 WHEN 0.05049592582495154857724628527648746967315673828125 THEN t2.c2 END)>(greatest(t2.c2, t2.c0))) FROM t2 RIGHT OUTER JOIN (SELECT ALL l1t1.c0, CASE WHEN l1t1.c0 THEN l1t1.c0 WHEN l1t1.c0 THEN l1t1.c0 WHEN l1t1.c0 THEN l1t1.c0 END FROM t2 AS l1t2, t1 AS l1t1 WHERE l1t1.c0) AS sub0 ON ((FALSE)OR(TRUE)) @@ -308,4 +308,8 @@ WHEN l1t1.c0 THEN l1t1.c0 WHEN l1t1.c0 T CROSS JOIN (VALUES (r'-|cQ5', least(6, 4), CASE 0.13214429 WHEN 0.92287980834693872367324729566462337970733642578125 THEN r'Bv*氅.x' END), (r'', 0.7763767959438655, "insert"(r'RR6Mw+', 5, -65604773, r'1225096844'))) AS sub1)) AS sub0 CROSS JOIN (VALUES (2, ((0.53827864)>>("day"(DATE '1969-12-27'))), CAST(((2)+(-1758578278)) AS REAL))) AS sub1) as res; + +SELECT ALL t1.c0 FROM t1, t2 CROSS JOIN ((SELECT 1 FROM t2) +EXCEPT (SELECT ALL ((CASE 0.1 WHEN 0.2 THEN t2.c2 END)>(greatest(t2.c2, t2.c0))) FROM t2)) AS sub0 +WHERE (3.0) IS NOT NULL; --error ROLLBACK; diff --git a/sql/test/SQLancer/Tests/sqlancer02.stable.err b/sql/test/SQLancer/Tests/sqlancer02.stable.err --- a/sql/test/SQLancer/Tests/sqlancer02.stable.err +++ b/sql/test/SQLancer/Tests/sqlancer02.stable.err @@ -31,6 +31,12 @@ QUERY = update t2 set c1 = (scale_down(t where (scale_up(-1155480997, 0.5434124050282382)) is not null; ERROR = !Overflow in round CODE = 22003 +MAPI = (monetdb) /var/tmp/mtest-658427/.s.monetdb.32418 +QUERY = SELECT ALL t1.c0 FROM t1, t2 CROSS JOIN ((SELECT 1 FROM t2) +EXCEPT (SELECT ALL ((CASE 0.1 WHEN 0.2 THEN t2.c2 END)>(greatest(t2.c2, t2.c0))) FROM t2)) AS sub0 +WHERE (3.0) IS NOT NULL; --error +ERROR = !types boolean(1,0) and tinyint(1,0) are not equal +CODE = 42000 # 17:04:12 > # 17:04:12 > "Done." diff --git a/sql/test/SQLancer/Tests/sqlancer02.stable.out b/sql/test/SQLancer/Tests/sqlancer02.stable.out --- a/sql/test/SQLancer/Tests/sqlancer02.stable.out +++ b/sql/test/SQLancer/Tests/sqlancer02.stable.out @@ -361,6 +361,952 @@ stdout of test 'sqlancer02` in directory #-1.7976931348623157e+308 [ 6] #ROLLBACK; +#START TRANSACTION; +#CREATE TABLE "sys"."t1" ("c0" BOOLEAN NOT NULL,"c1" DECIMAL(18,3) NOT NULL,CONSTRAINT "t1_c0_c1_pkey" PRIMARY KEY ("c0", "c1")); +#COPY 8 RECORDS INTO "sys"."t1" FROM stdin USING DELIMITERS E'\t',E'\n','"'; +#false 0.970 +#true 0.249 +#false 0.901 +#true 0.416 +#true 0.150 +#true -1.000 +#true 0.305 +#false 0.310 +[ 8] +#CREATE TABLE "sys"."t2" ("c0" DOUBLE NOT NULL,"c1" CHAR(21),"c2" DOUBLE); +#COPY 16 RECORDS INTO "sys"."t2" FROM st
MonetDB: Oct2020 - SQLancer query with wrong results. Looking in...
Changeset: 2242e7df83bc for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2242e7df83bc Modified Files: sql/test/SQLancer/Tests/sqlancer02.sql Branch: Oct2020 Log Message: SQLancer query with wrong results. Looking into it diffs (58 lines): diff --git a/sql/test/SQLancer/Tests/sqlancer02.sql b/sql/test/SQLancer/Tests/sqlancer02.sql --- a/sql/test/SQLancer/Tests/sqlancer02.sql +++ b/sql/test/SQLancer/Tests/sqlancer02.sql @@ -258,3 +258,54 @@ 0.3672199296718357 update t2 set c1 = (scale_down(t2.c1, 0.39861114390109142480156378951505757868289947509765625)) where (scale_up(-1155480997, 0.5434124050282382)) is not null; ROLLBACK; + +START TRANSACTION; +CREATE TABLE "sys"."t1" ("c0" BOOLEAN NOT NULL,"c1" DECIMAL(18,3) NOT NULL,CONSTRAINT "t1_c0_c1_pkey" PRIMARY KEY ("c0", "c1")); +COPY 8 RECORDS INTO "sys"."t1" FROM stdin USING DELIMITERS E'\t',E'\n','"'; +false 0.970 +true 0.249 +false 0.901 +true 0.416 +true 0.150 +true -1.000 +true 0.305 +false 0.310 + +CREATE TABLE "sys"."t2" ("c0" DOUBLE NOT NULL,"c1" CHAR(21),"c2" DOUBLE); +COPY 16 RECORDS INTO "sys"."t2" FROM stdin USING DELIMITERS E'\t',E'\n','"'; +1 NULLNULL +1 NULLNULL +0.20096332264638103NULL-8177017368 +0.6291712421744081 NULL3 +0.5608280161984844 "\n)GV3\n4w," NULL +0.2283066361977384 "DoiQ2" NULL +0.4162827659910059 "" NULL +0.7076516986629799 "2" NULL +0.0724600616400724 "true" 9 +0.03951652412329898"" 1.5639034457363068 +0.4631650256727575 "0.10356338203734772" 0.2836868317291048 +-7.88997488NULLNULL +0.9604713389860059 NULLNULL +0.7959037091231439 NULLNULL +0.38681017904242443NULLNULL +-4.411138449465319 NULLNULL + +SELECT ALL t1.c0 FROM t1, t2 CROSS JOIN ((SELECT "isauuid"(COALESCE(t2.c1, t2.c1)) FROM t2 WHERE ((TRUE)AND(TRUE)))OR +(TRUE)))OR(TRUE)))OR(FALSE)))AND(TRUE))) EXCEPT (SELECT ALL ((CASE 0.54967607103225102349597364082001149654388427734375 +WHEN 0.05049592582495154857724628527648746967315673828125 THEN t2.c2 END)>(greatest(t2.c2, t2.c0))) FROM t2 +RIGHT OUTER JOIN (SELECT ALL l1t1.c0, CASE WHEN l1t1.c0 THEN l1t1.c0 WHEN l1t1.c0 THEN l1t1.c0 WHEN l1t1.c0 +THEN l1t1.c0 END FROM t2 AS l1t2, t1 AS l1t1 WHERE l1t1.c0) AS sub0 ON ((FALSE)OR(TRUE)) +CROSS JOIN (VALUES (r'-|cQ5', least(6, 4), CASE 0.13214429 WHEN 0.92287980834693872367324729566462337970733642578125 +THEN r'Bv*氅.x' END), (r'', 0.7763767959438655, "insert"(r'RR6Mw+', 5, -65604773, r'1225096844'))) AS sub1)) AS sub0 +CROSS JOIN (VALUES (2, ((0.53827864)>>("day"(DATE '1969-12-27'))), CAST(((2)+(-1758578278)) AS REAL))) AS sub1 +WHERE (3.0) IS NOT NULL; + +SELECT CAST(SUM(count) AS BIGINT) FROM (SELECT ALL CAST((3.0) IS NOT NULL AS INT) as count FROM t1, t2 CROSS JOIN +((SELECT "isauuid"(COALESCE(t2.c1, t2.c1)) FROM t2 WHERE ((TRUE)AND(TRUE)))OR(TRUE)))OR(TRUE)))OR(FALSE)))AND(TRUE))) +EXCEPT ALL (SELECT ALL ((CASE 0.54967607103225102349597364082001149654388427734375 WHEN 0.05049592582495154857724628527648746967315673828125 +THEN t2.c2 END)>(greatest(t2.c2, t2.c0))) FROM t2 RIGHT OUTER JOIN (SELECT l1t1.c0, CASE WHEN l1t1.c0 THEN l1t1.c0 +WHEN l1t1.c0 THEN l1t1.c0 WHEN l1t1.c0 THEN l1t1.c0 END FROM t2 AS l1t2, t1 AS l1t1 WHERE l1t1.c0) AS sub0 ON ((FALSE)OR(TRUE)) +CROSS JOIN (VALUES (r'-|cQ5', least(6, 4), CASE 0.13214429 WHEN 0.92287980834693872367324729566462337970733642578125 +THEN r'Bv*氅.x' END), (r'', 0.7763767959438655, "insert"(r'RR6Mw+', 5, -65604773, r'1225096844'))) AS sub1)) AS sub0 +CROSS JOIN (VALUES (2, ((0.53827864)>>("day"(DATE '1969-12-27'))), CAST(((2)+(-1758578278)) AS REAL))) AS sub1) as res; +ROLLBACK; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2020 branch.
Changeset: e3e1ceb86782 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e3e1ceb86782 Modified Files: testing/Mtest.py.in Branch: default Log Message: Merge with Oct2020 branch. diffs (12 lines): diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -3573,6 +3573,8 @@ def main(argv) : a = opts.data_path if a is not None: env['TSTDATAPATH'] = a +elif os.getenv('TSTDATAPATH'): +env['TSTDATAPATH'] = os.getenv('TSTDATAPATH') global initdb initdb = opts.initdb global single_in_memory ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Oct2020 - It TSTDATAPATH in environment, accept it as a...
Changeset: fbeef607ca99 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fbeef607ca99 Modified Files: testing/Mtest.py.in Branch: Oct2020 Log Message: It TSTDATAPATH in environment, accept it as alternative for --data_path option. diffs (12 lines): diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -3894,6 +3894,8 @@ def main(argv) : a = opts.data_path if a is not None: env['TSTDATAPATH'] = a +elif os.getenv('TSTDATAPATH'): +env['TSTDATAPATH'] = os.getenv('TSTDATAPATH') global initdb initdb = opts.initdb global single_in_memory ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Cleanup: remove algebra.firstn without candid...
Changeset: 9b67fa9cbfc1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9b67fa9cbfc1 Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 monetdb5/modules/kernel/algebra.c monetdb5/modules/mal/Tests/pqueue.maltest monetdb5/modules/mal/Tests/pqueue2.maltest monetdb5/modules/mal/Tests/pqueue3.maltest sql/backends/monet5/sql_statement.c Branch: default Log Message: Cleanup: remove algebra.firstn without candidate list/subgroup. diffs (truncated from 582 to 300 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -611,11 +611,7 @@ stdout of test 'MAL-signatures` in direc [ "algebra", "fetch","command algebra.fetch(X_1:bat[:any_1], X_2:oid):any_1 ", "ALGfetchoid;", "" ] [ "algebra", "find", "command algebra.find(X_1:bat[:any_1], X_2:any_1):oid ","ALGfind;", "" ] [ "algebra", "firstn", "pattern algebra.firstn(X_1:bat[:any], X_2:bat[:oid], X_3:bat[:oid], X_4:lng, X_5:bit, X_6:bit, X_7:bit):bat[:oid] ", "ALGfirstn;", "" ] -[ "algebra", "firstn", "pattern algebra.firstn(X_1:bat[:any], X_2:bat[:oid], X_3:lng, X_4:bit, X_5:bit, X_6:bit):bat[:oid] ", "ALGfirstn;", "" ] -[ "algebra", "firstn", "pattern algebra.firstn(X_1:bat[:any], X_2:lng, X_3:bit, X_4:bit, X_5:bit):bat[:oid] ", "ALGfirstn;", "" ] [ "algebra", "firstn", "pattern algebra.firstn(X_2:bat[:any], X_3:bat[:oid], X_4:bat[:oid], X_5:lng, X_6:bit, X_7:bit, X_8:bit) (X_0:bat[:oid], X_1:bat[:oid]) ", "ALGfirstn;", "" ] -[ "algebra", "firstn", "pattern algebra.firstn(X_2:bat[:any], X_3:bat[:oid], X_4:lng, X_5:bit, X_6:bit, X_7:bit) (X_0:bat[:oid], X_1:bat[:oid]) ", "ALGfirstn;", "" ] -[ "algebra", "firstn", "pattern algebra.firstn(X_2:bat[:any], X_3:lng, X_4:bit, X_5:bit, X_6:bit) (X_0:bat[:oid], X_1:bat[:oid]) ","ALGfirstn;", "" ] [ "algebra", "groupby", "command algebra.groupby(X_1:bat[:oid], X_2:bat[:lng]):bat[:oid] ", "ALGgroupby;", "" ] [ "algebra", "ilike","command algebra.ilike(X_1:str, X_2:str):bit ", "PCREilike2;", "" ] [ "algebra", "ilike","command algebra.ilike(X_1:str, X_2:str, X_3:str):bit ","PCREilike3;", "" ] diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -724,11 +724,7 @@ stdout of test 'MAL-signatures` in direc [ "algebra", "fetch","command algebra.fetch(X_1:bat[:any_1], X_2:oid):any_1 ", "ALGfetchoid;", "" ] [ "algebra", "find", "command algebra.find(X_1:bat[:any_1], X_2:any_1):oid ","ALGfind;", "" ] [ "algebra", "firstn", "pattern algebra.firstn(X_1:bat[:any], X_2:bat[:oid], X_3:bat[:oid], X_4:lng, X_5:bit, X_6:bit, X_7:bit):bat[:oid] ", "ALGfirstn;", "" ] -[ "algebra", "firstn", "pattern algebra.firstn(X_1:bat[:any], X_2:bat[:oid], X_3:lng, X_4:bit, X_5:bit, X_6:bit):bat[:oid] ", "ALGfirstn;", "" ] -[ "algebra", "firstn", "pattern algebra.firstn(X_1:bat[:any], X_2:lng, X_3:bit, X_4:bit, X_5:bit):bat[:oid] ", "ALGfirstn;", "" ] [ "algebra", "firstn", "pattern algebra.firstn(X_2:bat[:any], X_3:bat[:oid], X_4:bat[:oid], X_5:lng, X_6:bit, X_7:bit, X_8:bit) (X_0:bat[:oid], X_1:bat[:oid]) ", "ALGfirstn;", "" ] -[ "algebra", "firstn", "pattern algebra.firstn(X_2:bat[:any], X_3:bat[:oid], X_4:lng, X_5:bit, X_6:bit, X_7:bit) (X_0:bat[:oid], X_1:bat[:oid]) ", "ALGfirstn;", "" ] -[ "algebra", "firstn", "pattern algebra.firstn(X_2:bat[:any], X_3:lng, X_4:bit, X_5:bit, X_6:bit) (X_0:bat[:oid], X_1:bat[:oid]) ","ALGfirstn;", "" ] [ "algebra", "groupby", "command algebra.groupby(X_1:bat[:oid], X_2:bat[:lng]):bat[:oid] ", "ALGgroupby;", "" ] [ "algebra", "ilike","command algebra.ilike(X_1:str, X_2:str):bit ", "PCREilike2;", "" ] [ "algebra", "ilike","command algebra.ilike(X_1:str, X_2:str, X_3:str):bit ","PCREilike3;", "" ] diff --git a/monetdb5/modules/kernel/algebra.c b/monetdb5/modules/kernel/algebra.c --- a/monetdb5/modules/kernel/algebra.c +++ b/monetdb5/modules/kernel/algebra.c @@ -679,7 +679,7 @@ ALGfirstn(Client cntxt, MalBlkPtr mb, Ma assert(pci->retc == 1 || pci->retc == 2); assert(pci->argc - pci->retc >= 5 && pci->argc - pci->retc <= 7); - n = * getArgReference_lng(stk, pci, pci->argc - 4); + n = *getArgReference_lng(stk, pci, pci->argc - 4); if (n < 0 || (lng) n >= (lng) BUN_MAX) throw(MAL, "algebra.firstn"
MonetDB: properties - Merged with default
Changeset: aebd2c7b8803 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=aebd2c7b8803 Modified Files: sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_statement.c sql/server/rel_exp.c sql/server/rel_optimizer.c sql/server/rel_updates.c Branch: properties Log Message: Merged with default diffs (truncated from 7425 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -793,3 +793,6 @@ ac8254a47e87d0be9df2a623e2c2fcf67c0f982d ac8254a47e87d0be9df2a623e2c2fcf67c0f982d Oct2020_SP1_release 929f5e280bc1532a2bfaab127ca7915dc3b69a33 Oct2020_9 929f5e280bc1532a2bfaab127ca7915dc3b69a33 Oct2020_SP2_release +742b7847cfdcea39a6c19ab29eb35471d46bb2bb Oct2020_11 +929f5e280bc1532a2bfaab127ca7915dc3b69a33 Oct2020_SP2_release +742b7847cfdcea39a6c19ab29eb35471d46bb2bb Oct2020_SP2_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -823,6 +823,10 @@ else fi %changelog +* Mon Jan 18 2021 Sjoerd Mullender - 11.39.11-20210118 +- Rebuilt. +- GH#3772: Any user can grant a role. + * Mon Jan 11 2021 Sjoerd Mullender - 11.39.9-20210111 - Rebuilt. - GH#6862: mserver5: crashes under update_table() when calling lib_sql.so diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -675,10 +675,8 @@ stdout of test 'MAL-signatures` in direc [ "algebra", "subslice", "command algebra.subslice(X_1:bat[:any_1], X_2:lng, X_3:lng):bat[:oid] ", "ALGsubslice_lng;", "" ] [ "algebra", "thetajoin","command algebra.thetajoin(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid], X_4:bat[:oid], X_5:int, X_6:bit, X_7:lng):bat[:oid] ", "ALGthetajoin1;", "" ] [ "algebra", "thetajoin","command algebra.thetajoin(X_2:bat[:any_1], X_3:bat[:any_1], X_4:bat[:oid], X_5:bat[:oid], X_6:int, X_7:bit, X_8:lng) (X_0:bat[:oid], X_1:bat[:oid]) ", "ALGthetajoin;","" ] -[ "algebra", "thetaselect", "command algebra.thetaselect(X_1:bat[:any_1], X_2:any_1, X_3:str):bat[:oid] ", "ALGthetaselect1;", "" ] [ "algebra", "thetaselect", "command algebra.thetaselect(X_1:bat[:any_1], X_2:bat[:oid], X_3:any_1, X_4:str):bat[:oid] ", "ALGthetaselect2;", "" ] -[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1]):bat[:oid] ", "ALGunique1;", "" ] -[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1], X_2:bat[:oid]):bat[:oid] ","ALGunique2;", "" ] +[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1], X_2:bat[:oid]):bat[:oid] ","ALGunique;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid], X_4:bit):bat[:any_1] ", "BKCappend_cand_force_wrap;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid]):bat[:any_1] ", "BKCappend_cand_wrap;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bit):bat[:any_1] ", "BKCappend_force_wrap;","" ] @@ -8544,19 +8542,12 @@ stdout of test 'MAL-signatures` in direc [ "generator", "series", "pattern generator.series(X_1:sht, X_2:sht, X_3:sht):bat[:sht] ", "VLTgenerator_table;", "" ] [ "generator", "series", "pattern generator.series(X_1:timestamp, X_2:timestamp, X_3:lng):bat[:timestamp] ", "VLTgenerator_table;", "" ] [ "generator", "thetaselect", "pattern generator.thetaselect(X_1:bat[:bte], X_2:bat[:oid], X_3:bte, X_4:str):bat[:oid] ", "VLTgenerator_thetasubselect;", "" ] -[ "generator", "thetaselect", "pattern generator.thetaselect(X_1:bat[:bte], X_2:bte, X_3:str):bat[:oid] ","VLTgenerator_thetasubselect;", "" ] [ "generator", "thetaselect", "pattern generator.thetaselect(X_1:bat[:dbl], X_2:bat[:oid], X_3:dbl, X_4:str):bat[:oid] ", "VLTgenerator_thetasubselect;", "" ] -[ "generator", "thetaselect", "pattern generator.thetaselect(X_1:bat[:dbl], X_2:dbl, X_3:str):bat[:oid] ","VLTgenerator_thetasubselect;", "" ] [ "generator", "thetaselect", "pattern generator.thetaselect(X_1:bat[:flt], X_2:bat[:oid], X_3:flt, X_4:str):bat[:oid] ", "VLTgenerator_thetasubselect;", "" ] -[ "generator", "thetaselect", "pattern generator.thetaselect(X_1:bat[:flt], X_2:flt, X_3:str):bat[:oid] ","VLTgenerator_thetasubselect;", "" ] [ "generator", "thetaselect", "pattern generator.thetaselect(X_1:bat[:int], X_2:bat[:oid], X_3:int, X_4:str):bat[:oid] ", "VLTgenerator_thetasubselect;", "" ] -[ "generator", "thetaselect", "pattern generator.thetaselect(X_1:bat[:int], X_2:int, X_3:str):bat[:oid] ","VLTgenerator_thetasubselect;", "" ] [ "generator", "thetaselect", "pattern genera
MonetDB: nospare - merged
Changeset: b51a633cc2b0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b51a633cc2b0 Modified Files: sql/backends/monet5/sql_statement.c sql/server/rel_optimizer.c testing/Mtest.py.in Branch: nospare Log Message: merged diffs (truncated from 1642 to 300 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -676,8 +676,7 @@ stdout of test 'MAL-signatures` in direc [ "algebra", "thetajoin","command algebra.thetajoin(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid], X_4:bat[:oid], X_5:int, X_6:bit, X_7:lng):bat[:oid] ", "ALGthetajoin1;", "" ] [ "algebra", "thetajoin","command algebra.thetajoin(X_2:bat[:any_1], X_3:bat[:any_1], X_4:bat[:oid], X_5:bat[:oid], X_6:int, X_7:bit, X_8:lng) (X_0:bat[:oid], X_1:bat[:oid]) ", "ALGthetajoin;","" ] [ "algebra", "thetaselect", "command algebra.thetaselect(X_1:bat[:any_1], X_2:bat[:oid], X_3:any_1, X_4:str):bat[:oid] ", "ALGthetaselect2;", "" ] -[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1]):bat[:oid] ", "ALGunique1;", "" ] -[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1], X_2:bat[:oid]):bat[:oid] ","ALGunique2;", "" ] +[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1], X_2:bat[:oid]):bat[:oid] ","ALGunique;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid], X_4:bit):bat[:any_1] ", "BKCappend_cand_force_wrap;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid]):bat[:any_1] ", "BKCappend_cand_wrap;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bit):bat[:any_1] ", "BKCappend_force_wrap;","" ] diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -789,8 +789,7 @@ stdout of test 'MAL-signatures` in direc [ "algebra", "thetajoin","command algebra.thetajoin(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid], X_4:bat[:oid], X_5:int, X_6:bit, X_7:lng):bat[:oid] ", "ALGthetajoin1;", "" ] [ "algebra", "thetajoin","command algebra.thetajoin(X_2:bat[:any_1], X_3:bat[:any_1], X_4:bat[:oid], X_5:bat[:oid], X_6:int, X_7:bit, X_8:lng) (X_0:bat[:oid], X_1:bat[:oid]) ", "ALGthetajoin;","" ] [ "algebra", "thetaselect", "command algebra.thetaselect(X_1:bat[:any_1], X_2:bat[:oid], X_3:any_1, X_4:str):bat[:oid] ", "ALGthetaselect2;", "" ] -[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1]):bat[:oid] ", "ALGunique1;", "" ] -[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1], X_2:bat[:oid]):bat[:oid] ","ALGunique2;", "" ] +[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1], X_2:bat[:oid]):bat[:oid] ","ALGunique;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid], X_4:bit):bat[:any_1] ", "BKCappend_cand_force_wrap;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid]):bat[:any_1] ", "BKCappend_cand_wrap;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bit):bat[:any_1] ", "BKCappend_force_wrap;","" ] diff --git a/clients/examples/C/bincopydata.c b/clients/examples/C/bincopydata.c --- a/clients/examples/C/bincopydata.c +++ b/clients/examples/C/bincopydata.c @@ -158,6 +158,7 @@ gen_large_strings(FILE *f, bool byteswap fwrite(buf, n, 1, f); fputc(0, f); } + free(buf); (void)byteswap; } @@ -173,7 +174,7 @@ gen_broken_strings(FILE *f, bool byteswa if (i == 123456) fwrite(latin1, sizeof(latin1), 1, f); else - fwrite(latin1, sizeof(utf8), 1, f); + fwrite(utf8, sizeof(utf8), 1, f); } } diff --git a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows --- a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows +++ b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows @@ -10,21 +10,23 @@ % .%1 # table_name % def # name % clob # type -% 580 # length +% 626 # length [ "optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.aliases();optimizer.evaluate();optimizer.emptybind();o
MonetDB: nospare - initial object cleanup
Changeset: 8d67276b9328 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8d67276b9328 Modified Files: sql/backends/monet5/sql_cat.c sql/backends/monet5/sql_user.c sql/common/sql_changeset.c sql/common/sql_list.c sql/include/sql_catalog.h sql/include/sql_list.h sql/server/rel_dump.c sql/server/rel_optimizer.c sql/server/rel_planner.c sql/server/rel_propagate.c sql/server/rel_psm.c sql/server/rel_select.c sql/server/rel_unnest.c sql/server/sql_partition.c sql/server/sql_var.c sql/storage/store.c Branch: nospare Log Message: initial object cleanup diffs (truncated from 891 to 300 lines): diff --git a/sql/backends/monet5/sql_cat.c b/sql/backends/monet5/sql_cat.c --- a/sql/backends/monet5/sql_cat.c +++ b/sql/backends/monet5/sql_cat.c @@ -260,6 +260,11 @@ alter_table_add_range_partition(mvc *sql const void *nil = ATOMnilptr(tp1); sql_table *errt = mvc_bind_table(sql, mt->s, err->base.name); + if (!errt) { + msg = createException(SQL,"sql.alter_table_add_range_partition",SQLSTATE(42000) + "ALTER TABLE: cannot find partition table %s.%s", err->t->s->base.name, err->base.name); + goto finish; + } if (!ATOMcmp(tp1, nil, err->part.range.minvalue)) { if (!(conflict_err_min = GDKstrdup("absolute min value"))) msg = createException(SQL,"sql.alter_table_add_range_partition",SQLSTATE(HY013) MAL_MALLOC_FAIL); diff --git a/sql/backends/monet5/sql_user.c b/sql/backends/monet5/sql_user.c --- a/sql/backends/monet5/sql_user.c +++ b/sql/backends/monet5/sql_user.c @@ -78,7 +78,7 @@ parse_schema_path_str(mvc *m, str schema if (build) { while (l->t) /* if building, empty schema_path list */ - (void) list_remove_node(l, l->t); + (void) list_remove_node(l, NULL, l->t); m->schema_path_has_sys = 0; m->schema_path_has_tmp = 0; } diff --git a/sql/common/sql_changeset.c b/sql/common/sql_changeset.c --- a/sql/common/sql_changeset.c +++ b/sql/common/sql_changeset.c @@ -19,14 +19,14 @@ cs_new(changeset * cs, sql_allocator *sa } void -cs_destroy(changeset * cs) +cs_destroy(changeset * cs, void *data) { if (cs->set) { - list_destroy(cs->set); + list_destroy2(cs->set, data); cs->set = NULL; } if (cs->dset) { - list_destroy(cs->dset); + list_destroy2(cs->dset, data); cs->dset = NULL; } } @@ -67,12 +67,12 @@ cs_add_before(changeset * cs, node *n, v } void -cs_del(changeset * cs, node *elm, int flags) +cs_del(changeset * cs, void *gdata, node *elm, int flags) { if (newFlagSet(flags)) {/* remove just added */ if (cs->nelm == elm) cs->nelm = elm->next; - list_remove_node(cs->set, elm); + list_remove_node(cs->set, gdata, elm); } else { if (!cs->dset) cs->dset = list_new(cs->sa, cs->destroy); @@ -107,13 +107,3 @@ cs_last_node(changeset * cs) { return cs->set->t; } - -void -cs_remove_node(changeset * cs, node *n) -{ - node *nxt = n->next; - - list_remove_node(cs->set, n); - if (cs->nelm == n) - cs->nelm = nxt; -} diff --git a/sql/common/sql_list.c b/sql/common/sql_list.c --- a/sql/common/sql_list.c +++ b/sql/common/sql_list.c @@ -84,10 +84,10 @@ list_empty(list *l) } static void -node_destroy(list *l, node *n) +node_destroy(list *l, void *data, node *n) { if (n->data && l->destroy) { - l->destroy(n->data); + l->destroy(data, n->data); n->data = NULL; } if (!l->sa) @@ -95,7 +95,7 @@ node_destroy(list *l, node *n) } void -list_destroy(list *l) +list_destroy2(list *l, void *data) { if (l) { node *n = l->h; @@ -107,7 +107,7 @@ list_destroy(list *l) node *t = n; n = t->next; - node_destroy(l, t); + node_destroy(l, data, t); } } @@ -119,6 +119,12 @@ list_destroy(list *l) } } +void +list_destroy(list *l) +{ + list_destroy2(l, NULL); +} + int list_length(list *l) { @@ -346,16 +352,16 @@ list_remove_node_(list *l, node *n) } node * -list_remove_node(list *l, node *n) +list_remove_node(list *l, void *gdata, node *n) {
MonetDB: nospare - somewhat more protection agains declared tables
Changeset: 7ea2e91e176b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7ea2e91e176b Modified Files: sql/storage/sql_catalog.c Branch: nospare Log Message: somewhat more protection agains declared tables diffs (12 lines): diff --git a/sql/storage/sql_catalog.c b/sql/storage/sql_catalog.c --- a/sql/storage/sql_catalog.c +++ b/sql/storage/sql_catalog.c @@ -484,6 +484,8 @@ partition_find_part(sql_trans *tr, sql_t { struct os_iter oi; + if (!pt->s) /* declared table */ + return NULL; os_iterator(&oi, pt->s->parts, tr, NULL); for (sql_base *b = oi_next(&oi); b; b = oi_next(&oi)) { sql_part *p = (sql_part*)b; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - assertMatchStableOut deals very badly with ad...
Changeset: 56051bfed85d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=56051bfed85d Modified Files: testing/sqltest.py Branch: default Log Message: assertMatchStableOut deals very badly with added/delete line in output. Instead, if there are lines with significant differences (quick_ratio < 0.95), provide a unified diff of the complete output. diffs (30 lines): diff --git a/testing/sqltest.py b/testing/sqltest.py --- a/testing/sqltest.py +++ b/testing/sqltest.py @@ -394,13 +394,14 @@ class MclientTestResult(TestCaseResult, stable = list(filter(filter_headers, stable)) data = list(filter(filter_headers, data)) a, b = filter_matching_blocks(stable, data) -diff = list(difflib.unified_diff(a, b, fromfile='stable', tofile='test')) -if len(diff) > 0: -err_file = self.test_case.err_file -msg = "expected to match stable output {} but it didnt\'t\n".format(fout) -msg+='\n'.join(diff) -self.assertion_errors.append(AssertionError(msg)) -self.fail(msg) +if a or b: +diff = list(difflib.unified_diff(stable, data, fromfile='stable', tofile='test')) +if len(diff) > 0: +err_file = self.test_case.err_file +msg = "expected to match stable output {} but it didnt\'t\n".format(fout) +msg+='\n'.join(diff) +self.assertion_errors.append(AssertionError(msg)) +self.fail(msg) return self def assertMatchStableError(self, ferr, ignore_err_messages=False): @@ -675,4 +676,3 @@ class SQLTestCase(): except (pymonetdb.Error, ValueError) as e: pass - ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Remove single argument algebra.unique: always...
Changeset: 939c5134e01c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=939c5134e01c Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 monetdb5/modules/kernel/algebra.c sql/backends/monet5/sql_statement.c testing/Mtest.py.in Branch: default Log Message: Remove single argument algebra.unique: always specify candidate list. diffs (84 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -676,8 +676,7 @@ stdout of test 'MAL-signatures` in direc [ "algebra", "thetajoin","command algebra.thetajoin(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid], X_4:bat[:oid], X_5:int, X_6:bit, X_7:lng):bat[:oid] ", "ALGthetajoin1;", "" ] [ "algebra", "thetajoin","command algebra.thetajoin(X_2:bat[:any_1], X_3:bat[:any_1], X_4:bat[:oid], X_5:bat[:oid], X_6:int, X_7:bit, X_8:lng) (X_0:bat[:oid], X_1:bat[:oid]) ", "ALGthetajoin;","" ] [ "algebra", "thetaselect", "command algebra.thetaselect(X_1:bat[:any_1], X_2:bat[:oid], X_3:any_1, X_4:str):bat[:oid] ", "ALGthetaselect2;", "" ] -[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1]):bat[:oid] ", "ALGunique1;", "" ] -[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1], X_2:bat[:oid]):bat[:oid] ","ALGunique2;", "" ] +[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1], X_2:bat[:oid]):bat[:oid] ","ALGunique;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid], X_4:bit):bat[:any_1] ", "BKCappend_cand_force_wrap;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid]):bat[:any_1] ", "BKCappend_cand_wrap;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bit):bat[:any_1] ", "BKCappend_force_wrap;","" ] diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -789,8 +789,7 @@ stdout of test 'MAL-signatures` in direc [ "algebra", "thetajoin","command algebra.thetajoin(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid], X_4:bat[:oid], X_5:int, X_6:bit, X_7:lng):bat[:oid] ", "ALGthetajoin1;", "" ] [ "algebra", "thetajoin","command algebra.thetajoin(X_2:bat[:any_1], X_3:bat[:any_1], X_4:bat[:oid], X_5:bat[:oid], X_6:int, X_7:bit, X_8:lng) (X_0:bat[:oid], X_1:bat[:oid]) ", "ALGthetajoin;","" ] [ "algebra", "thetaselect", "command algebra.thetaselect(X_1:bat[:any_1], X_2:bat[:oid], X_3:any_1, X_4:str):bat[:oid] ", "ALGthetaselect2;", "" ] -[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1]):bat[:oid] ", "ALGunique1;", "" ] -[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1], X_2:bat[:oid]):bat[:oid] ","ALGunique2;", "" ] +[ "algebra", "unique", "command algebra.unique(X_1:bat[:any_1], X_2:bat[:oid]):bat[:oid] ","ALGunique;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid], X_4:bit):bat[:any_1] ", "BKCappend_cand_force_wrap;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bat[:oid]):bat[:any_1] ", "BKCappend_cand_wrap;", "" ] [ "bat", "append", "command bat.append(X_1:bat[:any_1], X_2:bat[:any_1], X_3:bit):bat[:any_1] ", "BKCappend_force_wrap;","" ] diff --git a/monetdb5/modules/kernel/algebra.c b/monetdb5/modules/kernel/algebra.c --- a/monetdb5/modules/kernel/algebra.c +++ b/monetdb5/modules/kernel/algebra.c @@ -750,7 +750,7 @@ ALGcopy(bat *result, const bat *bid) } static str -ALGunique2(bat *result, const bat *bid, const bat *sid) +ALGunique(bat *result, const bat *bid, const bat *sid) { BAT *b, *s = NULL, *bn = NULL; @@ -773,12 +773,6 @@ ALGunique2(bat *result, const bat *bid, } static str -ALGunique1(bat *result, const bat *bid) -{ - return ALGunique2(result, bid, NULL); -} - -static str ALGcrossproduct(bat *l, bat *r, const bat *left, const bat *right, const bit *max_one) { BAT *L, *R, *bn1, *bn2 = NULL; @@ -1410,8 +1404,7 @@ mel_func algebra_init_funcs[] = { command("algebra", "sort", ALGsort31, false, "Returns a copy of the BAT sorted on tail values.\nThe order is descending if the reverse bit is set.\nThis is a stable sort if the stable bit is set.", args(1,7, batargany("",1),batargany("b",1),batarg("o",oid),batarg("g",oid),arg("reverse",bit),arg("nilslast",bit),arg("stable",bit))), comma
MonetDB: default - Use a more portable call to detect the CPU ar...
Changeset: 220b887e175c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=220b887e175c Modified Files: sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py sql/test/emptydb-upgrade-chain/Tests/upgrade.py sql/test/emptydb-upgrade-hge/Tests/upgrade.py sql/test/emptydb-upgrade/Tests/upgrade.py sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py sql/test/testdb-upgrade-chain/Tests/upgrade.py sql/test/testdb-upgrade-hge/Tests/upgrade.py sql/test/testdb-upgrade/Tests/upgrade.py Branch: default Log Message: Use a more portable call to detect the CPU architecture diffs (184 lines): diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py --- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py +++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py @@ -9,9 +9,7 @@ try: except ImportError: import process -import sys -import os -import zipfile +import sys, os, zipfile, platform xit = 0 @@ -50,7 +48,7 @@ if len(sys.argv) == 2 and sys.argv[1] == bits = ['.' + bits, ''] else: bits = [''] -arch = os.uname()[4] +arch = platform.machine() arch = ['.' + arch, ''] hge = os.getenv('HAVE_HGE') if hge: diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.py b/sql/test/emptydb-upgrade-chain/Tests/upgrade.py --- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.py +++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.py @@ -9,9 +9,7 @@ try: except ImportError: import process -import sys -import os -import zipfile +import sys, os, zipfile, platform xit = 0 @@ -50,7 +48,7 @@ if len(sys.argv) == 2 and sys.argv[1] == bits = ['.' + bits, ''] else: bits = [''] -arch = os.uname()[4] +arch = platform.machine() arch = ['.' + arch, ''] hge = os.getenv('HAVE_HGE') if hge: diff --git a/sql/test/emptydb-upgrade-hge/Tests/upgrade.py b/sql/test/emptydb-upgrade-hge/Tests/upgrade.py --- a/sql/test/emptydb-upgrade-hge/Tests/upgrade.py +++ b/sql/test/emptydb-upgrade-hge/Tests/upgrade.py @@ -9,9 +9,7 @@ try: except ImportError: import process -import sys -import os -import zipfile +import sys, os, zipfile, platform xit = 0 @@ -50,7 +48,7 @@ if len(sys.argv) == 2 and sys.argv[1] == bits = ['.' + bits, ''] else: bits = [''] -arch = os.uname()[4] +arch = platform.machine() arch = ['.' + arch, ''] hge = os.getenv('HAVE_HGE') if hge: diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.py b/sql/test/emptydb-upgrade/Tests/upgrade.py --- a/sql/test/emptydb-upgrade/Tests/upgrade.py +++ b/sql/test/emptydb-upgrade/Tests/upgrade.py @@ -9,9 +9,7 @@ try: except ImportError: import process -import sys -import os -import zipfile +import sys, os, zipfile, platform xit = 0 @@ -50,7 +48,7 @@ if len(sys.argv) == 2 and sys.argv[1] == bits = ['.' + bits, ''] else: bits = [''] -arch = os.uname()[4] +arch = platform.machine() arch = ['.' + arch, ''] hge = os.getenv('HAVE_HGE') if hge: diff --git a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py --- a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py +++ b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py @@ -9,9 +9,7 @@ try: except ImportError: import process -import sys -import os -import zipfile +import sys, os, zipfile, platform xit = 0 @@ -51,7 +49,7 @@ if len(sys.argv) == 2 and sys.argv[1] == bits = ['.' + bits, ''] else: bits = [''] -arch = os.uname()[4] +arch = platform.machine() arch = ['.' + arch, ''] hge = os.getenv('HAVE_HGE') if hge: diff --git a/sql/test/testdb-upgrade-chain/Tests/upgrade.py b/sql/test/testdb-upgrade-chain/Tests/upgrade.py --- a/sql/test/testdb-upgrade-chain/Tests/upgrade.py +++ b/sql/test/testdb-upgrade-chain/Tests/upgrade.py @@ -9,9 +9,7 @@ try: except ImportError: import process -import sys -import os -import zipfile +import sys, os, zipfile, platform xit = 0 @@ -51,7 +49,7 @@ if len(sys.argv) == 2 and sys.argv[1] == bits = ['.' + bits, ''] else: bits = [''] -arch = os.uname()[4] +arch = platform.machine() arch = ['.' + arch, ''] hge = os.getenv('HAVE_HGE') if hge: diff --git a/sql/test/testdb-upgrade-hge/Tests/upgrade.py b/sql/test/testdb-upgrade-hge/Tests/upgrade.py --- a/sql/test/testdb-upgrade-hge/Tests/upgrade.py +++ b/sql/test/testdb-upgrade-hge/Tests/upgrade.py @@ -9,9 +9,7 @@ try: except ImportError: import process -import sys -import os -import zipfile +import sys, os, zipfile, platform xit = 0 @@ -51,7 +49,7 @@ if len(sys.argv) == 2 and sys.argv[1] == bits = ['.' + bits, ''] else: bits = [''] -arch = os.uname()[4] +arch = platform.machine() arch = ['.' + arch, ''] hge
MonetDB: default - Approved Windows output
Changeset: 179f26df0666 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=179f26df0666 Modified Files: monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows Branch: default Log Message: Approved Windows output diffs (111 lines): diff --git a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows --- a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows +++ b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows @@ -10,21 +10,23 @@ % .%1 # table_name % def # name % clob # type -% 580 # length +% 626 # length [ "optimizer.inline();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.aliases();optimizer.evaluate();optimizer.emptybind();optimizer.pushselect();optimizer.aliases();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.reorder();optimizer.matpack();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.candidates();optimizer.deadcode();optimizer.postfix();optimizer.wlc();optimizer.garbageCollector();" ] #explain copy into ttt from E'\\tmp/xyz'; % .explain # table_name % mal # name % clob # type -% 235 # length +% 274 # length function user.main():void; querylog.define("explain copy into ttt from E\\'tmp/xyz\\';":str, "sequential_pipe":str, 22:int); X_4:int := sql.mvc(); -(X_28:bat[:int], X_29:bat[:int], X_30:bat[:int]) := sql.copy_from(0x0049B72361C0:ptr, "|":str, "\n":str, nil:str, "null":str, "\\tmp/xyz":str, -1:lng, 0:lng, 0:int, 0:int, nil:str, 0:int, 1:int); -X_32:int := sql.append(X_4:int, "sys":str, "ttt":str, "averylongcolumnnametomakeitlargee":str, X_28:bat[:int]); -X_37:int := sql.append(X_32:int, "sys":str, "ttt":str, "b":str, X_29:bat[:int]); -X_40:int := sql.append(X_37:int, "sys":str, "ttt":str, "c":str, X_30:bat[:int]); +(X_28:bat[:int], X_29:bat[:int], X_30:bat[:int]) := sql.copy_from(0x025CF9E874C0:ptr, "|":str, "\n":str, nil:str, "null":str, "\\tmp/xyz":str, -1:lng, 0:lng, 0:int, 0:int, nil:str, 0:int, 1:int); +(X_86:int, X_85:ptr, X_90:ptr, X_93:ptr) := sql.append_prep(X_4:int, "sys":str, "ttt":str, "averylongcolumnnametomakeitlargee":str, "b":str, "c":str); +X_88:ptr := sql.append_exec(X_85:ptr, X_28:bat[:int]); +X_91:ptr := sql.append_exec(X_90:ptr, X_29:bat[:int]); +X_94:ptr := sql.append_exec(X_93:ptr, X_30:bat[:int]); X_42:lng := aggr.count(X_30:bat[:int]); +X_40:int := sql.append_finish(X_86:int, X_88:ptr, X_91:ptr, X_94:ptr); sql.affectedRows(X_40:int, X_42:lng); end user.main; #inline actions= 0 time=0 usec @@ -57,15 +59,17 @@ end user.main; % .explain # table_name % mal # name % clob # type -% 235 # length +% 274 # length function user.main():void; querylog.define("explain copy into ttt from E\\'a:tmp/xyz\\';":str, "sequential_pipe":str, 22:int); X_4:int := sql.mvc(); -(X_28:bat[:int], X_29:bat[:int], X_30:bat[:int]) := sql.copy_from(0x0049B72361C0:ptr, "|":str, "\n":str, nil:str, "null":str, "a:\\tmp/xyz":str, -1:lng, 0:lng, 0:int, 0:int, nil:str, 0:int, 1:int); -X_32:int := sql.append(X_4:int, "sys":str, "ttt":str, "averylongcolumnnametomakeitlargee":str, X_28:bat[:int]); -X_37:int := sql.append(X_32:int, "sys":str, "ttt":str, "b":str, X_29:bat[:int]); -X_40:int := sql.append(X_37:int, "sys":str, "ttt":str, "c":str, X_30:bat[:int]); +(X_28:bat[:int], X_29:bat[:int], X_30:bat[:int]) := sql.copy_from(0x025CF9E874C0:ptr, "|":str, "\n":str, nil:str, "null":str, "a:\\tmp/xyz":str, -1:lng, 0:lng, 0:int, 0:int, nil:str, 0:int, 1:int); +(X_86:int, X_85:ptr, X_90:ptr, X_93:ptr) := sql.append_prep(X_4:int, "sys":str, "ttt":str, "averylongcolumnnametomakeitlargee":str, "b":str, "c":str); +X_88:ptr := sql.append_exec(X_85:ptr, X_28:bat[:int]); +X_91:ptr := sql.append_exec(X_90:ptr, X_29:bat[:int]); +X_94:ptr := sql.append_exec(X_93:ptr, X_30:bat[:int]); X_42:lng := aggr.count(X_30:bat[:int]); +X_40:int := sql.append_finish(X_86:int, X_88:ptr, X_91:ptr, X_94:ptr); sql.affectedRows(X_40:int, X_42:lng); end user.main; #inline actions= 0 time=1 usec @@ -108,22 +112,24 @@ end user.main; % .%1 # tabl
MonetDB: default - Merged with Oct2020
Changeset: a96e9a08f10a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a96e9a08f10a Modified Files: sql/server/rel_optimizer.c sql/test/Tests/keys.test Branch: default Log Message: Merged with Oct2020 diffs (truncated from 309 to 300 lines): diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -9381,14 +9381,13 @@ replace_column_references_with_nulls_2(m static sql_rel * out2inner(visitor *v, sql_rel* sel, sql_rel* join, sql_rel* inner_join_side, operator_type new_type) { -list* select_predicates = exps_copy(v->sql, sel->exps); - if (!is_base(inner_join_side->op) && !is_simple_project(inner_join_side->op)) { // Nothing to do here. return sel; } list* inner_join_column_references = inner_join_side->exps; +list* select_predicates = exps_copy(v->sql, sel->exps); for(node* n = select_predicates->h; n; n=n->next) { sql_exp* e = n->data; @@ -9532,6 +9531,8 @@ rel_remove_union_partitions(visitor *v, return rel; if (exp_is_zero_rows(v->sql, rel->l, NULL)) { sql_rel *r = rel->r; + if (!is_project(r->op)) + r = rel_project(v->sql->sa, r, rel_projections(v->sql, r, NULL, 1, 1)); rel_rename_exps(v->sql, rel->exps, r->exps); rel->r = NULL; rel_destroy(rel); @@ -9540,6 +9541,8 @@ rel_remove_union_partitions(visitor *v, } if (exp_is_zero_rows(v->sql, rel->r, NULL)) { sql_rel *l = rel->l; + if (!is_project(l->op)) + l = rel_project(v->sql->sa, l, rel_projections(v->sql, l, NULL, 1, 1)); rel_rename_exps(v->sql, rel->exps, l->exps); rel->l = NULL; rel_destroy(rel); diff --git a/sql/test/Tests/keys.sql b/sql/test/Tests/keys.sql --- a/sql/test/Tests/keys.sql +++ b/sql/test/Tests/keys.sql @@ -7,9 +7,11 @@ CREATE INDEX allnewtriples_predicate_idx CREATE INDEX allnewtriples_object_idx ON allnewtriples ("object"); SELECT idxs.name, idxs."type", keys.name, keys."type" -FROM sys.idxs LEFT JOIN sys.keys on idxs.name = keys.name; +FROM sys.idxs LEFT JOIN sys.keys on idxs.name = keys.name +ORDER BY idxs.name, keys.name; SELECT idxs.name, idxs."type", keys.name, keys."type" -FROM sys.idxs JOIN sys.keys on idxs.name = keys.name; +FROM sys.idxs JOIN sys.keys on idxs.name = keys.name +ORDER BY idxs.name, keys.name; /* test elimination of distinct restriction on aggregates */ create table dummyme (a int primary key, b int); diff --git a/sql/test/Tests/keys.stable.out b/sql/test/Tests/keys.stable.out --- a/sql/test/Tests/keys.stable.out +++ b/sql/test/Tests/keys.stable.out @@ -60,27 +60,27 @@ stdout of test 'keys` in directory 'sql/ % name,type, name, type # name % varchar, int,varchar,int # type % 44, 1, 44, 1 # length +[ "allnewtriples_object_idx", 0, NULL, NULL] +[ "allnewtriples_predicate_idx", 0, NULL, NULL] +[ "allnewtriples_subject_idx", 0, NULL, NULL] [ "comments_id_pkey", 0, "comments_id_pkey", 0 ] [ "dependency_types_dependency_type_id_pkey", 0, "dependency_types_dependency_type_id_pkey", 0 ] [ "dependency_types_dependency_type_name_unique", 0, "dependency_types_dependency_type_name_unique", 1 ] -[ "spatial_ref_sys_srid_pkey", 0, "spatial_ref_sys_srid_pkey",0 ] -[ "keywords_keyword_pkey", 0, "keywords_keyword_pkey",0 ] -[ "table_types_table_type_id_pkey",0, "table_types_table_type_id_pkey", 0 ] -[ "table_types_table_type_name_unique",0, "table_types_table_type_name_unique", 1 ] -[ "function_types_function_type_id_pkey", 0, "function_types_function_type_id_pkey", 0 ] -[ "function_types_function_type_name_unique", 0, "function_types_function_type_name_unique", 1 ] [ "function_languages_language_id_pkey", 0, "function_languages_language_id_pkey", 0 ] [ "function_languages_language_name_unique", 0, "function_languages_language_name_unique", 1 ] -[ "key_types_key_type_id_pkey",0, "key_types_key_type_id_pkey", 0 ] -[ "key_types_key_type_name_unique",0, "key_types_key_type_name_unique", 1 ] +[ "function_types_function_type_id_pkey", 0, "function_types_function_type_id_pkey", 0 ] +[ "function_types_function_type_name_unique", 0, "function_types_function_type_name_unique", 1 ] [ "index_types_index_type_id_pkey",0, "index_types_index_type_id_pkey", 0 ] [ "index_types_index_type_name_unique",0, "index_types_index_type_name_unique", 1 ] +[ "key_types_key_type_id_pkey",0, "key_types
MonetDB: Oct2020 - Copy exps only when the optimizer applies
Changeset: 4dc03ee04489 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4dc03ee04489 Modified Files: sql/server/rel_optimizer.c Branch: Oct2020 Log Message: Copy exps only when the optimizer applies diffs (19 lines): diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -9387,14 +9387,13 @@ replace_column_references_with_nulls_2(m static sql_rel * out2inner(visitor *v, sql_rel* sel, sql_rel* join, sql_rel* inner_join_side, operator_type new_type) { -list* select_predicates = exps_copy(v->sql, sel->exps); - if (!is_base(inner_join_side->op) && !is_simple_project(inner_join_side->op)) { // Nothing to do here. return sel; } list* inner_join_column_references = inner_join_side->exps; +list* select_predicates = exps_copy(v->sql, sel->exps); for(node* n = select_predicates->h; n; n=n->next) { sql_exp* e = n->data; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Added (a = b) or (a is null and b is null) ->...
Changeset: c72cb267ac31 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c72cb267ac31 Modified Files: sql/server/rel_exp.c sql/server/rel_optimizer.c sql/test/miscellaneous/Tests/simple_plans.sql sql/test/miscellaneous/Tests/simple_plans.test Branch: default Log Message: Added (a = b) or (a is null and b is null) -> a *= b optimization. This helps on bug #6968 diffs (235 lines): diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c --- a/sql/server/rel_exp.c +++ b/sql/server/rel_exp.c @@ -1729,25 +1729,22 @@ exp_is_true(sql_exp *e) } static inline bool -exp_is_cmp_exp_is_false(sql_exp* e) { -assert(e->type == e_cmp); -assert(e->semantics && (e->flag == cmp_equal || e->flag == cmp_notequal)); -assert(e->f == NULL); -sql_exp* l = e->l; -sql_exp* r = e->r; -assert (l && r); - -/* Handle 'v is x' and 'v is not x' expressions. - * Other cases in is-semantics are unspecified. - */ -if (e->flag == cmp_equal && !e->anti) { -return ((exp_is_null(l) && exp_is_not_null(r)) || (exp_is_not_null(l) && exp_is_null(r))); -} -if (((e->flag == cmp_notequal) && !e->anti) || ((e->flag == cmp_equal) && e->anti) ) { -return ((exp_is_null(l) && exp_is_null(r)) || (exp_is_not_null(l) && exp_is_not_null(r))); -} - -return false; +exp_is_cmp_exp_is_false(sql_exp* e) +{ + sql_exp *l = e->l; + sql_exp *r = e->r; + assert(e->type == e_cmp && e->f == NULL && l && r); + + /* Handle 'v is x' and 'v is not x' expressions. + * Other cases in is-semantics are unspecified. + */ + if (e->flag != cmp_equal && e->flag != cmp_notequal) + return false; + if (e->flag == cmp_equal && !e->anti) + return ((exp_is_null(l) && exp_is_not_null(r)) || (exp_is_not_null(l) && exp_is_null(r))); + if (((e->flag == cmp_notequal) && !e->anti) || ((e->flag == cmp_equal) && e->anti) ) + return ((exp_is_null(l) && exp_is_null(r)) || (exp_is_not_null(l) && exp_is_not_null(r))); + return false; } static inline bool diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c --- a/sql/server/rel_optimizer.c +++ b/sql/server/rel_optimizer.c @@ -7739,6 +7739,59 @@ rel_simplify_ifthenelse(visitor *v, sql_ return e; } +/* optimize (a = b) or (a is null and b is null) -> a = b with null semantics */ +static sql_exp * +try_rewrite_equal_or_is_null(mvc *sql, sql_exp *or, list *l1, list *l2) +{ + if (list_length(l1) == 1) { + bool valid = true, first_is_null_found = false, second_is_null_found = false; + sql_exp *cmp = l1->h->data; + sql_exp *first = cmp->l, *second = cmp->r; + + if (is_compare(cmp->type) && !is_anti(cmp) && !cmp->f && cmp->flag == cmp_equal) { + for(node *n = l2->h ; n && valid; n = n->next) { + sql_exp *e = n->data; + + if (is_compare(e->type) && e->flag == cmp_equal && !e->f && + !is_anti(e) && is_semantics(e) && exp_is_null(e->r)) { + if (exp_match_exp(first, e->l)) + first_is_null_found = true; + else if (exp_match_exp(second, e->l)) + second_is_null_found = true; + else + valid = false; + } else { + valid = false; + } + } + if (valid && first_is_null_found && second_is_null_found) { + sql_exp *res = exp_compare(sql->sa, first, second, cmp->flag); + set_semantics(res); + if (exp_name(or)) + exp_prop_alias(sql->sa, res, or); + return res; + } + } + } + return or; +} + +static sql_exp * +rel_merge_cmp_or_null(visitor *v, sql_rel *rel, sql_exp *e, int depth) +{ + (void) rel; + (void) depth; + if (is_compare(e->type) && e->flag == cmp_or && !is_anti(e)) { + sql_exp *ne = try_rewrite_equal_or_is_null(v->sql, e, e->l, e->r); + if (ne != e) + return ne; + ne = try_rewrite_equal_or_is_null(v->sql, e, e->r, e->l); + if (ne != e) + return ne; + } + return e; +} + static void split_exps(mvc *sql, list *exps, sql_rel *rel); static int @@ -9558,6 +9611,8 @@ optimize_rel(mvc *sql, sql_rel *rel, int gp.cnt[op_left] || gp.cnt[op_right] || gp.cnt[op_full] || gp.cnt[op
MonetDB: default - Plug a hole.
Changeset: 0217af419cdf for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0217af419cdf Modified Files: monetdb5/modules/kernel/batstr.c Branch: default Log Message: Plug a hole. diffs (59 lines): diff --git a/monetdb5/modules/kernel/batstr.c b/monetdb5/modules/kernel/batstr.c --- a/monetdb5/modules/kernel/batstr.c +++ b/monetdb5/modules/kernel/batstr.c @@ -1191,6 +1191,7 @@ do_batstr_batint_conststr_str(Client cnt } } bailout: + GDKfree(buf); finalize_ouput(res, bn, msg, nils, q); unfix_inputs(4, left, ls, right, rs); return msg; @@ -1648,13 +1649,13 @@ bailout: } static str -STRbatPrefix(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) +STRbatPrefix(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) { return prefix_or_suffix(cntxt, mb, stk, pci, "batstr.startsWith", str_is_prefix); } static str -STRbatSuffix(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) +STRbatSuffix(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) { return prefix_or_suffix(cntxt, mb, stk, pci, "batstr.endsWith", str_is_suffix); } @@ -2976,13 +2977,13 @@ STRbatSubstitute(Client cntxt, MalBlkPtr msg = createException(MAL, "batstr.substritute", SQLSTATE(HY005) RUNTIME_OBJECT_MISSING); goto bailout; } - if ((sid1 && !is_bat_nil(*sid1) && !(arg1s = BATdescriptor(*sid1))) || (sid2 && !is_bat_nil(*sid2) && !(arg2s = BATdescriptor(*sid2))) || + if ((sid1 && !is_bat_nil(*sid1) && !(arg1s = BATdescriptor(*sid1))) || (sid2 && !is_bat_nil(*sid2) && !(arg2s = BATdescriptor(*sid2))) || (sid3 && !is_bat_nil(*sid3) && !(arg2s = BATdescriptor(*sid3))) || (sid4 && !is_bat_nil(*sid4) && !(arg4s = BATdescriptor(*sid4 { msg = createException(MAL, "batstr.substritute", SQLSTATE(HY005) RUNTIME_OBJECT_MISSING); goto bailout; } q = canditer_init(&ci1, arg1, arg1s); - if (canditer_init(&ci2, arg2, arg2s) != q || ci1.hseq != ci2.hseq || canditer_init(&ci3, arg3, arg3s) != q || + if (canditer_init(&ci2, arg2, arg2s) != q || ci1.hseq != ci2.hseq || canditer_init(&ci3, arg3, arg3s) != q || ci2.hseq != ci3.hseq || canditer_init(&ci4, arg4, arg4s) != q || ci3.hseq != ci4.hseq) { msg = createException(MAL, "batstr.substritute", ILLEGAL_ARGUMENT " Requires bats of identical size"); goto bailout; @@ -3572,13 +3573,13 @@ STRbatInsert(Client cntxt, MalBlkPtr mb, msg = createException(MAL, "batstr.insert", SQLSTATE(HY005) RUNTIME_OBJECT_MISSING); goto bailout; } - if ((sid1 && !is_bat_nil(*sid1) && !(ls = BATdescriptor(*sid1))) || (sid2 && !is_bat_nil(*sid2) && !(rs = BATdescriptor(*sid2))) || + if ((sid1 && !is_bat_nil(*sid1) && !(ls = BATdescriptor(*sid1))) || (sid2 && !is_bat_nil(*sid2) && !(rs = BATdescriptor(*sid2))) || (sid3 && !is_bat_nil(*sid3) && !(ss = BATdescriptor(*sid3))) || (sid4 && !is_bat_nil(*sid4) && !(ns = BATdescriptor(*sid4 { msg = createException(MAL, "batstr.insert", SQLSTATE(HY005) RUNTIME_OBJECT_MISSING); goto bailout; } q = canditer_init(&ci1, left, ls); - if (canditer_init(&ci2, start, ss) != q || ci1.hseq != ci2.hseq || canditer_init(&ci3, nchars, ns) != q || + if (canditer_init(&ci2, start, ss) != q || ci1.hseq != ci2.hseq || canditer_init(&ci3, nchars, ns) != q || ci2.hseq != ci3.hseq || canditer_init(&ci4, right, rs) != q || ci3.hseq != ci4.hseq) { msg = createException(MAL, "batstr.insert", ILLEGAL_ARGUMENT " Requires bats of identical size"); goto bailout; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Cast to a smaller decimal to avoid overflow
Changeset: 54c0fad700b3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=54c0fad700b3 Modified Files: sql/test/bincopy/Tests/bincopy_support.py Branch: default Log Message: Cast to a smaller decimal to avoid overflow diffs (21 lines): diff --git a/sql/test/bincopy/Tests/bincopy_support.py b/sql/test/bincopy/Tests/bincopy_support.py --- a/sql/test/bincopy/Tests/bincopy_support.py +++ b/sql/test/bincopy/Tests/bincopy_support.py @@ -189,7 +189,7 @@ SELECT * FROM foo WHERE EXTRACT(MINUTE FROM ts) <> "minute" LIMIT 4; SELECT * FROM foo -WHERE 100 * EXTRACT(SECOND FROM ts) <> 100 * "second" + ms +WHERE 100 * CAST(EXTRACT(SECOND FROM ts) AS DECIMAL(13,6)) <> 100 * "second" + ms LIMIT 4; SELECT * FROM foo @@ -209,7 +209,7 @@ SELECT * FROM foo WHERE EXTRACT(MINUTE FROM tm) <> "minute" LIMIT 4; SELECT * FROM foo -WHERE 100 * EXTRACT(SECOND FROM tm) <> 100 * "second" + ms +WHERE 100 * CAST(EXTRACT(SECOND FROM tm) AS DECIMAL(13,6)) <> 100 * "second" + ms LIMIT 4; """, [f"{NRECS} affected rows"]) ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Run with single server.
Changeset: 12a79f29e3d9 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=12a79f29e3d9 Added Files: sql/test/bincopy/Tests/SingleServer Branch: default Log Message: Run with single server. diffs (2 lines): diff --git a/sql/test/bincopy/Tests/SingleServer b/sql/test/bincopy/Tests/SingleServer new file mode 100644 ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - These tests require huge integers
Changeset: 543b39f87f6a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=543b39f87f6a Modified Files: sql/test/bincopy/Tests/All Branch: default Log Message: These tests require huge integers diffs (14 lines): diff --git a/sql/test/bincopy/Tests/All b/sql/test/bincopy/Tests/All --- a/sql/test/bincopy/Tests/All +++ b/sql/test/bincopy/Tests/All @@ -28,8 +28,8 @@ bincopy_doubles_on_client bincopy_doubles_on_server bincopy_integer_types_on_client bincopy_integer_types_on_server -bincopy_huge_ints_on_client -bincopy_huge_ints_on_server +HAVE_HGE?bincopy_huge_ints_on_client +HAVE_HGE?bincopy_huge_ints_on_server bincopy_decimals_on_client bincopy_decimals_on_server HAVE_HGE?bincopy_huge_decimals_on_client ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Fixing valgrind issues
Changeset: b0bd9024cd4d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b0bd9024cd4d Modified Files: clients/examples/C/bincopydata.c Branch: default Log Message: Fixing valgrind issues diffs (20 lines): diff --git a/clients/examples/C/bincopydata.c b/clients/examples/C/bincopydata.c --- a/clients/examples/C/bincopydata.c +++ b/clients/examples/C/bincopydata.c @@ -158,6 +158,7 @@ gen_large_strings(FILE *f, bool byteswap fwrite(buf, n, 1, f); fputc(0, f); } + free(buf); (void)byteswap; } @@ -173,7 +174,7 @@ gen_broken_strings(FILE *f, bool byteswa if (i == 123456) fwrite(latin1, sizeof(latin1), 1, f); else - fwrite(latin1, sizeof(utf8), 1, f); + fwrite(utf8, sizeof(utf8), 1, f); } } ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Add TSTSRCDIR to the path
Changeset: 7e36f7f78133 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7e36f7f78133 Modified Files: sql/test/bincopy/Tests/bincopy_big_endians_on_client.SQL.py sql/test/bincopy/Tests/bincopy_big_endians_on_server.SQL.py sql/test/bincopy/Tests/bincopy_bools_on_client.SQL.py sql/test/bincopy/Tests/bincopy_bools_on_server.SQL.py sql/test/bincopy/Tests/bincopy_broken_strings_on_client.SQL.py sql/test/bincopy/Tests/bincopy_broken_strings_on_server.SQL.py sql/test/bincopy/Tests/bincopy_decimals_on_client.SQL.py sql/test/bincopy/Tests/bincopy_decimals_on_server.SQL.py sql/test/bincopy/Tests/bincopy_doubles_on_client.SQL.py sql/test/bincopy/Tests/bincopy_doubles_on_server.SQL.py sql/test/bincopy/Tests/bincopy_floats_on_client.SQL.py sql/test/bincopy/Tests/bincopy_floats_on_server.SQL.py sql/test/bincopy/Tests/bincopy_huge_decimals_on_client.SQL.py sql/test/bincopy/Tests/bincopy_huge_decimals_on_server.SQL.py sql/test/bincopy/Tests/bincopy_huge_ints_on_client.SQL.py sql/test/bincopy/Tests/bincopy_huge_ints_on_server.SQL.py sql/test/bincopy/Tests/bincopy_inconsistent_length_on_client.SQL.py sql/test/bincopy/Tests/bincopy_inconsistent_length_on_server.SQL.py sql/test/bincopy/Tests/bincopy_integer_types_on_client.SQL.py sql/test/bincopy/Tests/bincopy_integer_types_on_server.SQL.py sql/test/bincopy/Tests/bincopy_ints_on_client.SQL.py sql/test/bincopy/Tests/bincopy_ints_on_server.SQL.py sql/test/bincopy/Tests/bincopy_json_objects_on_client.SQL.py sql/test/bincopy/Tests/bincopy_json_objects_on_server.SQL.py sql/test/bincopy/Tests/bincopy_large_strings_on_client.SQL.py sql/test/bincopy/Tests/bincopy_large_strings_on_server.SQL.py sql/test/bincopy/Tests/bincopy_little_endians_on_client.SQL.py sql/test/bincopy/Tests/bincopy_little_endians_on_server.SQL.py sql/test/bincopy/Tests/bincopy_more_ints_on_client.SQL.py sql/test/bincopy/Tests/bincopy_more_ints_on_server.SQL.py sql/test/bincopy/Tests/bincopy_native_endians_on_client.SQL.py sql/test/bincopy/Tests/bincopy_native_endians_on_server.SQL.py sql/test/bincopy/Tests/bincopy_newlines_on_client.SQL.py sql/test/bincopy/Tests/bincopy_newlines_on_server.SQL.py sql/test/bincopy/Tests/bincopy_null_ints_on_client.SQL.py sql/test/bincopy/Tests/bincopy_null_ints_on_server.SQL.py sql/test/bincopy/Tests/bincopy_null_strings_on_client.SQL.py sql/test/bincopy/Tests/bincopy_null_strings_on_server.SQL.py sql/test/bincopy/Tests/bincopy_partial_on_client.SQL.py sql/test/bincopy/Tests/bincopy_partial_on_server.SQL.py sql/test/bincopy/Tests/bincopy_strings_on_client.SQL.py sql/test/bincopy/Tests/bincopy_strings_on_server.SQL.py sql/test/bincopy/Tests/bincopy_timestamps_on_client.SQL.py sql/test/bincopy/Tests/bincopy_timestamps_on_server.SQL.py sql/test/bincopy/Tests/bincopy_urls_on_client.SQL.py sql/test/bincopy/Tests/bincopy_urls_on_server.SQL.py sql/test/bincopy/Tests/bincopy_uuids_on_client.SQL.py sql/test/bincopy/Tests/bincopy_uuids_on_server.SQL.py Branch: default Log Message: Add TSTSRCDIR to the path diffs (truncated from 576 to 300 lines): diff --git a/sql/test/bincopy/Tests/bincopy_big_endians_on_client.SQL.py b/sql/test/bincopy/Tests/bincopy_big_endians_on_client.SQL.py --- a/sql/test/bincopy/Tests/bincopy_big_endians_on_client.SQL.py +++ b/sql/test/bincopy/Tests/bincopy_big_endians_on_client.SQL.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 +import sys +import os +sys.path.append(os.getenv('TSTSRCDIR')) from bincopy_support import run_test from bincopy_support import BIG_ENDIANS as testcode diff --git a/sql/test/bincopy/Tests/bincopy_big_endians_on_server.SQL.py b/sql/test/bincopy/Tests/bincopy_big_endians_on_server.SQL.py --- a/sql/test/bincopy/Tests/bincopy_big_endians_on_server.SQL.py +++ b/sql/test/bincopy/Tests/bincopy_big_endians_on_server.SQL.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 +import sys +import os +sys.path.append(os.getenv('TSTSRCDIR')) from bincopy_support import run_test from bincopy_support import BIG_ENDIANS as testcode diff --git a/sql/test/bincopy/Tests/bincopy_bools_on_client.SQL.py b/sql/test/bincopy/Tests/bincopy_bools_on_client.SQL.py --- a/sql/test/bincopy/Tests/bincopy_bools_on_client.SQL.py +++ b/sql/test/bincopy/Tests/bincopy_bools_on_client.SQL.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 +import sys +import os +sys.path.append(os.getenv('TSTSRCDIR')) from bincopy_support import run_test from bincopy_support import BOOLS as testcode diff --git a/sql/test/bincopy/Tests/bincopy_bools_on_server.SQL.py b/sql/test/bincopy/Tests/bincopy_bools_on_server.SQL.py --- a/sql/test/bincopy/Tests/bincopy_bools_on_server.SQL.py +++ b/sql/test/bin
MonetDB: Oct2020 - Add ordering.
Changeset: 4a5ff7db4481 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a5ff7db4481 Modified Files: sql/test/Tests/keys.sql sql/test/Tests/keys.stable.out Branch: Oct2020 Log Message: Add ordering. diffs (88 lines): diff --git a/sql/test/Tests/keys.sql b/sql/test/Tests/keys.sql --- a/sql/test/Tests/keys.sql +++ b/sql/test/Tests/keys.sql @@ -7,9 +7,11 @@ CREATE INDEX allnewtriples_predicate_idx CREATE INDEX allnewtriples_object_idx ON allnewtriples ("object"); SELECT idxs.name, idxs."type", keys.name, keys."type" -FROM sys.idxs LEFT JOIN sys.keys on idxs.name = keys.name; +FROM sys.idxs LEFT JOIN sys.keys on idxs.name = keys.name +ORDER BY idxs.name, keys.name; SELECT idxs.name, idxs."type", keys.name, keys."type" -FROM sys.idxs JOIN sys.keys on idxs.name = keys.name; +FROM sys.idxs JOIN sys.keys on idxs.name = keys.name +ORDER BY idxs.name, keys.name; /* test elimination of distinct restriction on aggregates */ create table dummyme (a int primary key, b int); diff --git a/sql/test/Tests/keys.stable.out b/sql/test/Tests/keys.stable.out --- a/sql/test/Tests/keys.stable.out +++ b/sql/test/Tests/keys.stable.out @@ -60,27 +60,27 @@ stdout of test 'keys` in directory 'sql/ % name,type, name, type # name % varchar, int,varchar,int # type % 44, 1, 44, 1 # length +[ "allnewtriples_object_idx", 0, NULL, NULL] +[ "allnewtriples_predicate_idx", 0, NULL, NULL] +[ "allnewtriples_subject_idx", 0, NULL, NULL] [ "comments_id_pkey", 0, "comments_id_pkey", 0 ] [ "dependency_types_dependency_type_id_pkey", 0, "dependency_types_dependency_type_id_pkey", 0 ] [ "dependency_types_dependency_type_name_unique", 0, "dependency_types_dependency_type_name_unique", 1 ] -[ "spatial_ref_sys_srid_pkey", 0, "spatial_ref_sys_srid_pkey",0 ] -[ "keywords_keyword_pkey", 0, "keywords_keyword_pkey",0 ] -[ "table_types_table_type_id_pkey",0, "table_types_table_type_id_pkey", 0 ] -[ "table_types_table_type_name_unique",0, "table_types_table_type_name_unique", 1 ] -[ "function_types_function_type_id_pkey", 0, "function_types_function_type_id_pkey", 0 ] -[ "function_types_function_type_name_unique", 0, "function_types_function_type_name_unique", 1 ] [ "function_languages_language_id_pkey", 0, "function_languages_language_id_pkey", 0 ] [ "function_languages_language_name_unique", 0, "function_languages_language_name_unique", 1 ] -[ "key_types_key_type_id_pkey",0, "key_types_key_type_id_pkey", 0 ] -[ "key_types_key_type_name_unique",0, "key_types_key_type_name_unique", 1 ] +[ "function_types_function_type_id_pkey", 0, "function_types_function_type_id_pkey", 0 ] +[ "function_types_function_type_name_unique", 0, "function_types_function_type_name_unique", 1 ] [ "index_types_index_type_id_pkey",0, "index_types_index_type_id_pkey", 0 ] [ "index_types_index_type_name_unique",0, "index_types_index_type_name_unique", 1 ] +[ "key_types_key_type_id_pkey",0, "key_types_key_type_id_pkey", 0 ] +[ "key_types_key_type_name_unique",0, "key_types_key_type_name_unique", 1 ] +[ "keywords_keyword_pkey", 0, "keywords_keyword_pkey",0 ] [ "privilege_codes_privilege_code_id_pkey",0, "privilege_codes_privilege_code_id_pkey", 0 ] [ "privilege_codes_privilege_code_name_unique",0, "privilege_codes_privilege_code_name_unique", 1 ] +[ "spatial_ref_sys_srid_pkey", 0, "spatial_ref_sys_srid_pkey",0 ] +[ "table_types_table_type_id_pkey",0, "table_types_table_type_id_pkey", 0 ] +[ "table_types_table_type_name_unique",0, "table_types_table_type_name_unique", 1 ] [ "unique_key",0, "unique_key", 1 ] -[ "allnewtriples_subject_idx", 0, NULL, NULL] -[ "allnewtriples_predicate_idx", 0, NULL, NULL] -[ "allnewtriples_object_idx", 0, NULL, NULL] #SELECT idxs.name, idxs."type", keys.name, keys."type" #FROM idxs JOIN keys on idxs.name = keys.name; % sys.idxs,sys.idxs, sys.keys, sys.keys # table_name @@ -90,20 +90,20 @@ stdout of test 'keys` in directory 'sql/ [ "comments_id_pkey", 0, "comments_id_pkey", 0 ] [ "dependency_types_dependency_type_id_pkey", 0, "dependency_types_dependency_type_id_pkey", 0 ] [ "dependency_types_dependency_type_name_unique", 0, "dependency_types_dependency_type_name_unique", 1 ] -[ "spatial_ref_sys_srid_pkey", 0, "spatial_ref_sys_srid_pkey",0 ] -[ "keywords_keyword_pkey", 0, "keyw