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

Query did not produce a result set #2798

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

Query did not produce a result set #2798

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

Comments

@monetdb-team
Copy link

Date: 2011-04-05 09:01:58 +0200
From: Bas Kaptijn <<b.kaptijn>>
To: SQL devs <>
Version: 11.3.1 (Apr2011) [obsolete]
CC: @njnes

Last updated: 2019-06-06 13:57:24 +0200

Comment 15717

Date: 2011-04-05 09:01:58 +0200
From: Bas Kaptijn <<b.kaptijn>>

User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MS-RTC LM 8)
Build Identifier:

Hi,

with the MAR2011 release (x64 windows through installer) (and also the release Feb2010-SP2) I get an exception running a particular query, whilst
a slightly modified one with the expected result (except for the naming of a result column) does not. I narrowed
the problem down to this:

sql>CREATE TABLE dbg (a INT, b INT);
operation successful

sql>INSERT INTO dbg (a,b) VALUES (10,10);
1 affected row (32.410ms)

sql>SELECT a as d, SUM(b), (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP BY d;

+------+------+------+
| d | L451 | f |
+======+======+======+
| 10 | 10 | 10 |
+------+------+------+
1 tuple (8.841ms)

sql>SELECT a as d, SUM(b) as e, (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP
BY d;
sql>

The second select query does not produce a result set (as stated in the SQLException I get when doing this through JDBC). The monetdb client
just shows a new prompt without stating any warning/error. The query works when I remove the "as e" ... or the "select 2" but in the real case
I get this problem this select does much more than just selecting the number 2.

I think this is a bug.

Reproducible: Always

Steps to Reproduce:

  1. sql>CREATE TABLE dbg (a INT, b INT);
  2. sql>INSERT INTO dbg (a,b) VALUES (10,10);
  3. sql>SELECT a as d, SUM(b) as e, (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP BY d;

Actual Results:

nothing

Expected Results:

10, 10, 10

When I try this I see that the server prints:
could not find (null).e
dbg.d
dbg.L13
L15.L15
dbg.d

and with assertions enabled, in addition it says:
mserver5: /home/sjoerd/src/MonetDB/candidate/sql/server/rel_bin.c:1481:
rel2bin_project: Assertion `0' failed.
Aborted - core dumped

--
Sjoerd Mullender

Comment 15741

Date: 2011-04-27 14:12:05 +0200
From: @grobian

bug is still in Apr2011, and is not limited to windows/64-bits

Comment 15742

Date: 2011-04-27 14:12:11 +0200
From: @grobian

Changeset d8cb04c78402 made by Fabian Groffen fabian@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

Add test for bug #2798

Comment 15800

Date: 2011-05-13 15:54:47 +0200
From: @njnes

Changeset 7316fbd4e9d2 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=7316fbd4e9d2

Changeset description:

fix bug #2798 (use correct old project list)

fixed bug #2807 (aggr on with primary key problems). Properly find column using
an expression.

Comment 15813

Date: 2011-05-16 22:23:48 +0200
From: @njnes

was fixed some time ago

Comment 19590

Date: 2014-02-19 18:21:44 +0100
From: MonetDB Mercurial Repository <>

Changeset 62361db70e8d made by Stefan Manegold Stefan.Manegold@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

crash_on_alias.Bug-2798: extended test with EXPLAIN to analyze/debug crash with int128

Comment 19591

Date: 2014-02-19 18:29:32 +0100
From: MonetDB Mercurial Repository <>

Changeset 606511bbb995 made by Stefan Manegold Stefan.Manegold@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

crash_on_alias.Bug-2798: extended test with PLAN to analyze/debug crash with int128

Comment 27027

Date: 2019-06-06 13:57:24 +0200
From: MonetDB Mercurial Repository <>

Changeset 74f63592625d made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

Undo the cast(... as bigint)) changes made to crash_on_alias.Bug-2798 in changeset 69345:55505094267b
It appears that the plans with the cast(... as bigint)) are different on non-int128 platforms, so we need an .int128 output anyway.
@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