Changeset: 92957b73e447 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=92957b73e447 Modified Files: sql/test/mergetables/Tests/sqlsmith-exists2.sql sql/test/miscellaneous/Tests/groupby_error.sql sql/test/subquery/Tests/subquery6.sql Branch: Jun2020 Log Message:
Starting the day with breakfast bugs and crashes :S diffs (83 lines): diff --git a/sql/test/mergetables/Tests/sqlsmith-exists2.sql b/sql/test/mergetables/Tests/sqlsmith-exists2.sql --- a/sql/test/mergetables/Tests/sqlsmith-exists2.sql +++ b/sql/test/mergetables/Tests/sqlsmith-exists2.sql @@ -241,4 +241,47 @@ from tab1 on (true); -- 27 rows with 1 +select + ref_1.col3 as c0, + ref_1.col4 as c1, + cast(nullif(ref_0.col0, + subq_0.c8) as int) as c2 from + tab1 as ref_0 + right join tbl_productsales as ref_1 + on (exists ( + select + ref_1.col1 as c0, + ref_2.col2 as c1, + ref_0.col0 as c2, + ref_2.col0 as c3, + ref_2.col0 as c4, + ref_1.col2 as c5 + from + tab1 as ref_2 + where false)) + inner join (select + ref_4.i as c0, + ref_3.col0 as c1, + ref_4.i as c2, + ref_4.i as c3, + ref_4.i as c4, + ref_4.i as c5, + ref_3.col2 as c6, + ref_4.i as c7, + ref_3.col2 as c8, + ref_4.i as c9 + from + tab0 as ref_3 + right join integers as ref_4 + on (true) + where ((((((73 is null) + and (ref_4.i is not null)) + or (true)) + and (ref_4.i is null)) + or (ref_3.col2 is null)) + or (true)) + and (ref_4.i is not null) + limit 56) as subq_0 + on (true) where true limit 85; + ROLLBACK; diff --git a/sql/test/miscellaneous/Tests/groupby_error.sql b/sql/test/miscellaneous/Tests/groupby_error.sql --- a/sql/test/miscellaneous/Tests/groupby_error.sql +++ b/sql/test/miscellaneous/Tests/groupby_error.sql @@ -32,6 +32,12 @@ SELECT col0 FROM tab2 WHERE - - col2; -- 75 -- 46 +SELECT 1 FROM tab0 WHERE NOT (NOT NULL IN (1)); + --empty + +SELECT - col0 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 WHERE NOT ( NOT + - CAST ( NULL AS INTEGER ) NOT IN ( col0 / CAST ( col2 AS INTEGER ) - + col1 ) ); + --empty + PLAN SELECT DISTINCT col0, col1, col2, col0 FROM tab0; SELECT DISTINCT col0, col1, col2, col0 FROM tab0; diff --git a/sql/test/subquery/Tests/subquery6.sql b/sql/test/subquery/Tests/subquery6.sql --- a/sql/test/subquery/Tests/subquery6.sql +++ b/sql/test/subquery/Tests/subquery6.sql @@ -36,6 +36,12 @@ WHERE ctr1.ctr_total_return > AND ctr1.ctr_customer_sk = TotalSales; --empty +SELECT i FROM integers i1 WHERE (SELECT CASE WHEN i1.i IS NULL THEN (SELECT FALSE FROM integers i2) ELSE TRUE END); + --error, more than one row returned by a subquery used as an expression + +SELECT (SELECT (SELECT SUM(col1)) IN (MAX(col2))) FROM another_t; + --False + DROP TABLE tbl_ProductSales; DROP TABLE another_T; DROP TABLE integers; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list