Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OR in subselect causes the server to crash with segmentation fault #6625

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2018-07-12 14:30:41 +0200
From: austin
To: SQL devs <>
Version: 11.29.3 (Mar2018)
CC: @njnes

Last updated: 2018-08-31 13:23:13 +0200

Comment 26547

Date: 2018-07-12 14:30:41 +0200
From: austin

Problem: Server crashes with segmentation fault when executing a query with a subselect which contains an OR-expression.

Environment:
ubuntu 16.04 in a docker container

Reproducible: Always

Steps to Reproduce:

CREATE TABLE a (a integer, b integer);
CREATE TABLE b (a integer, b integer);
SELECT (SELECT count(*) FROM b where a.a=b.a and (b.b=1 or b.b=2)) FROM a;

This is the smallest example we could find. Since even an EXPLAIN on the select does not work, it looks like the query planner already fails to parse and optimise the query. As soon as you replace the expressions of the OR-Part with something else then equals, the query will work just fine e.g.:

SELECT (SELECT count(*) FROM b where a.a=b.a and (b.b<=1 or b.b>=2)) FROM a;

Expected result:
Successful query execution without the server crashing

Comment 26551

Date: 2018-07-18 18:57:13 +0200
From: @njnes

seems to run without crashing on the March 2018 branch (after recent changes?)

Comment 26552

Date: 2018-07-18 18:58:15 +0200
From: MonetDB Mercurial Repository <>

Changeset fc8c8ae71f88 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=fc8c8ae71f88

Changeset description:

add test for bug #6625
@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants