Describe the bug
In a query that has a subquery with a GROUP BY-clause in the FROM clause MonetDB server crashes when having another correlated subquery in the SELECT clause.
To Reproduce
root@dd2a1e8e05d4:~# mclient testdb
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.39.18 (hg id: d0fc592188), 'mapi:monetdb://dd2a1e8e05d4:50000/testdb'
FOLLOW US on https://twitter.com/MonetDB or https://github.com/MonetDB/MonetDB
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>CREATE TABLE table1 (a bigint);
operation successful
sql>CREATE TABLE table2 (a bigint);
operation successful
sql>SELECT (SELECT max(1) FROM table2 WHERE a=tmp.a) FROM (SELECT a FROM table1 GROUP BY a) tmp;
sql>
write error on stream
Assertion in query_outer_used_exp goes off.
Problem is, this is true: !is_sql_aggr(f) && sq->grouped == 0 && e->card == CARD_AGGR which is almost the first part of the assert, except for the == vs. != at the end.
Describe the bug
In a query that has a subquery with a GROUP BY-clause in the FROM clause MonetDB server crashes when having another correlated subquery in the SELECT clause.
To Reproduce
Expected behavior
MonetDB does not crash
Screenshots
If applicable, add screenshots to help explain your problem.
Software versions
The text was updated successfully, but these errors were encountered: