This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
Nested query using = should return error message if there's more than one row returned #1372
Labels
bug
Something isn't working (correctness). Mark issues with this.
Bug Report
Summary
When using a nested query in the WHERE clause you can use an operator such as
=
or<
as long as the nested query returns a single row. However if the nested query returns more than one row than we should return an error to the user. Currently NoisePage crashes instead of returning an error message.Environment
OS: Ubuntu (LTS) 20.04
Compiler: GCC 7.0+
CMake Profile:
Debug
Jenkins/CI: N/A
Steps to Reproduce
The DB crashes with a Segmentation Fault
Expected Behavior
Note: the DB doesn't crash from this, just prints an error to the terminal
Notes
There are other similar queries that cause errors (They all start with the same creates and inserts). In Postgres they all have the same behavior of printing the same error message to the terminal.
SELECT * FROM foo1 WHERE a > (SELECT a FROM foo2);
Also causes a segfaultSELECT * FROM foo1 WHERE a = (SELECT MIN(a) FROM foo2 GROUP BY a);
Errors out and prints the following to the console:The text was updated successfully, but these errors were encountered: