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

SELECT EXISTS (empty table) returns 'true' #6392

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

SELECT EXISTS (empty table) returns 'true' #6392

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

Comments

@monetdb-team
Copy link

Date: 2017-08-14 11:22:50 +0200
From: @joerivanruth
To: SQL devs <>
Version: 11.27.5 (Jul2017-SP1)
CC: @njnes

Last updated: 2017-10-26 14:01:37 +0200

Comment 25578

Date: 2017-08-14 11:22:50 +0200
From: @joerivanruth

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
Build Identifier:

I would expect EXISTS to return false when applied to an empty query result.

Reproducible: Always

Steps to Reproduce:

CREATE TABLE foo(i INT);
SELECT EXISTS (SELECT i FROM foo WHERE FALSE);

Actual Results:

true

Expected Results:

false, because the result set of the inner selection is empty

Comment 25581

Date: 2017-08-16 18:20:58 +0200
From: MonetDB Mercurial Repository <>

Changeset 4a7ab58ad31a 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=4a7ab58ad31a

Changeset description:

fixed bugs 6386 and 6392

Comment 25583

Date: 2017-08-16 18:21:45 +0200
From: @njnes

fixed the implementation of exist_val.

@monetdb-team monetdb-team added bug Something isn't working major 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 major SQL
Projects
None yet
Development

No branches or pull requests

2 participants