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 fails with subquery result missing when adding condition #3250

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

SELECT fails with subquery result missing when adding condition #3250

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

Comments

@monetdb-team
Copy link

Date: 2013-03-09 15:01:24 +0100
From: Christian Braun <>
To: SQL devs <>
Version: 11.15.3 (Feb2013-SP1)
CC: hcb, @njnes

Last updated: 2013-07-31 12:49:40 +0200

Comment 18601

Date: 2013-03-09 15:01:24 +0100
From: Christian Braun <>

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Build Identifier:

Welcome to mclient, the MonetDB/SQL interactive terminal (Feb2013-SP1)
Database: MonetDB v11.15.3 (Feb2013-SP1), 'mapi:monetdb://etna:50000/broken2'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>select * from mytest;
+------+------+------+
| id | n | flag |
+======+======+======+
| 1 | 1 | null |
| 2 | 1 | null |
| 3 | 1 | null |
| 4 | 2 | null |
| 5 | 1 | 42 |
| 6 | 1 | 42 |
+------+------+------+
6 tuples (0.622ms)
sql>select id, n, flag, (select count() from mytest as i where i.id < mytest.id and i.n = mytest.n) from mytest order by id;
+------+------+------+------+
| id | n | flag | L2 |
+======+======+======+======+
| 1 | 1 | null | 0 |
| 2 | 1 | null | 1 |
| 3 | 1 | null | 2 |
| 4 | 2 | null | 0 |
| 5 | 1 | 42 | 3 |
| 6 | 1 | 42 | 4 |
+------+------+------+------+
6 tuples (1.952ms)
sql>select id, n, flag, (select count(
) from mytest as i where i.id < mytest.id and i.n = mytest.n and flag is not null) from mytest order by id;
SELECT: subquery result missing
sql>

Reproducible: Always

Comment 18639

Date: 2013-03-21 22:54:29 +0100
From: MonetDB Mercurial Repository <>

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

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=8e3776585f91

Changeset description:

fixed bug #3250 (handle join and select expressions in the correlated subquery)

Comment 18640

Date: 2013-03-21 22:55:07 +0100
From: @njnes

fixed, handle both join and select expressions in correlated subqueries

Comment 18961

Date: 2013-07-31 12:49:40 +0200
From: MonetDB Mercurial Repository <>

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

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=bb7bf53eaf84

Changeset description:

fixed bug #3250, handle correlation using apply operator
@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 Nov 9, 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