Changeset: fc83a6ecfbec for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fc83a6ecfbec Modified Files: sql/storage/store.c sql/test/subquery/Tests/subquery5.sql Branch: default Log Message:
merged diffs (37 lines): diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -1869,14 +1869,12 @@ store_load(backend_stack stk) { types_init(store_sa); - // TODO: Niels: Are we fine running this twice? - /* we store some spare oids */ store_oid = FUNC_OIDS; if (!sequences_init()) return -1; - transactions = ATOMIC_VAR_INIT(0); + ATOMIC_SET(&transactions, 0); gtrans = tr = create_trans(sa, stk); if (!gtrans) return -1; diff --git a/sql/test/subquery/Tests/subquery5.sql b/sql/test/subquery/Tests/subquery5.sql --- a/sql/test/subquery/Tests/subquery5.sql +++ b/sql/test/subquery/Tests/subquery5.sql @@ -86,6 +86,14 @@ SELECT corr(i1.i, i2.i) OVER () FROM int SELECT (SELECT SUM(i1.i) IN (SELECT CORR(i1.i, i2.i) FROM integers i2)) FROM integers i1; --error, subquery uses ungrouped column "i1.i" from outer query +SELECT (SELECT corr(col1, SUM(col2))) FROM another_t; --error, aggregate function calls cannot be nested + +SELECT (SELECT corr(col1, col2) WHERE corr(col3, SUM(col4)) > 0) FROM another_t GROUP BY col5; --error, aggregate function calls cannot be nested + +SELECT (SELECT 1 GROUP BY SUM(col2 + 1)) FROM another_t; --should we allow this? + +SELECT (SELECT 1 WHERE SUM(col2 + 1) > 0) FROM another_t; --allow this? + DROP FUNCTION evilfunction(INT); DROP TABLE tbl_ProductSales; DROP TABLE another_T; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list