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

Sqlitelogictest crash on aggregation query with not in #6557

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

Sqlitelogictest crash on aggregation query with not in #6557

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

Comments

@monetdb-team
Copy link

Date: 2018-03-15 10:33:50 +0100
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2019-08-20 12:07:27 +0200

Comment 26271

Date: 2018-03-15 10:33:50 +0100
From: @PedroTadim

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36
Build Identifier:

The query bellow triggers an assertion error in rel_bin.c

Reproducible: Always

Steps to Reproduce:

  1. CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER);
  2. INSERT INTO tab0 VALUES(83,0,38), (26,0,79), (43,81,24);
  3. SELECT DISTINCT col2 FROM tab0 GROUP BY col2, col1 HAVING NOT NULL NOT IN ( AVG ( ALL + col1 ) );

Actual Results:

Assertion error on rel_bin.c:576: Assertion `s' failed.

Expected Results:

An empty result set.

Backtrace:

0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
1 0x00007ffff477ac41 in __GI_abort () at abort.c:79
2 0x00007ffff4771f7a in __assert_fail_base (fmt=0x7ffff48c2260 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fffe84f65b8 "s", file=file@entry=0x7fffe84f6548 "rel_bin.c",
line=line@entry=576, function=function@entry=0x7fffe84f6d88 <PRETTY_FUNCTION.18599> "exp_bin") at assert.c:92
3 0x00007ffff4771ff2 in __GI___assert_fail (assertion=0x7fffe84f65b8 "s", file=0x7fffe84f6548 "rel_bin.c", line=576, function=0x7fffe84f6d88 <PRETTY_FUNCTION.18599> "exp_bin") at assert.c:101
4 0x00007fffe837d01e in exp_bin (be=0x7fffa8002b60, e=0x7fffa84cdce0, left=0x7fffa84cfaa0, right=0x7fffa84cfed0, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:576
5 0x00007fffe8387729 in rel2bin_groupby (be=0x7fffa8002b60, rel=0x7fffa84cd4d0, refs=0x7fffa84cf460) at rel_bin.c:2757
6 0x00007fffe8391f41 in subrel_bin (be=0x7fffa8002b60, rel=0x7fffa84cd4d0, refs=0x7fffa84cf460) at rel_bin.c:5064
7 0x00007fffe8386ca3 in rel2bin_select (be=0x7fffa8002b60, rel=0x7fffa84ce720, refs=0x7fffa84cf460) at rel_bin.c:2605
8 0x00007fffe8391f13 in subrel_bin (be=0x7fffa8002b60, rel=0x7fffa84ce720, refs=0x7fffa84cf460) at rel_bin.c:5060
9 0x00007fffe8386240 in rel2bin_project (be=0x7fffa8002b60, rel=0x7fffa84cec70, refs=0x7fffa84cf460, topn=0x0) at rel_bin.c:2469
10 0x00007fffe8391ee5 in subrel_bin (be=0x7fffa8002b60, rel=0x7fffa84cec70, refs=0x7fffa84cf460) at rel_bin.c:5056
11 0x00007fffe83871ce in rel2bin_groupby (be=0x7fffa8002b60, rel=0x7fffa84cd7d0, refs=0x7fffa84cf460) at rel_bin.c:2686
12 0x00007fffe8391f41 in subrel_bin (be=0x7fffa8002b60, rel=0x7fffa84cd7d0, refs=0x7fffa84cf460) at rel_bin.c:5064
13 0x00007fffe83921cd in _subrel_bin (be=0x7fffa8002b60, rel=0x7fffa84cd7d0, refs=0x7fffa84cf460) at rel_bin.c:5118
14 0x00007fffe83922e5 in output_rel_bin (be=0x7fffa8002b60, rel=0x7fffa84cd7d0) at rel_bin.c:5141
15 0x00007fffe83ae55c in sql_relation2stmt (be=0x7fffa8002b60, r=0x7fffa84cd7d0) at sql_gencode.c:542
16 0x00007fffe83ae74f in backend_dumpstmt (be=0x7fffa8002b60, mb=0x7fffa8094960, r=0x7fffa84cd7d0, top=1, add_end=1,
query=0x7fffa8087a40 "select distinct col2 from tab0 group by col2, col1 having not null not in ( avg ( all + col1 ) );") at sql_gencode.c:582
17 0x00007fffe83aefc7 in backend_dumpproc (be=0x7fffa8002b60, c=0x7fffe9737368, cq=0x7fffa8068e50, r=0x7fffa84cd7d0) at sql_gencode.c:712
18 0x00007fffe8370c88 in SQLparser (c=0x7fffe9737368) at sql_scenario.c:1233
19 0x00007ffff7a0cff5 in runPhase (c=0x7fffe9737368, phase=1) at mal_scenario.c:510
20 0x00007ffff7a0d0fe in runScenarioBody (c=0x7fffe9737368, once=0) at mal_scenario.c:532
21 0x00007ffff7a0d3b7 in runScenario (c=0x7fffe9737368, once=0) at mal_scenario.c:569
22 0x00007ffff7a0f2f2 in MSserveClient (dummy=0x7fffe9737368) at mal_session.c:514
23 0x00007ffff7a0ee41 in MSscheduleClient (command=0x7fffa8000b30 "0", challenge=0x7fffbf2dbd9b "dJ15zqmWYVE", fin=0x17f0040, fout=0x7fffb8002d90, protocol=PROTOCOL_9, blocksize=8190, compute_column_widths=0)
at mal_session.c:397
24 0x00007ffff7aafa45 in doChallenge (data=0x17f0050) at mal_mapi.c:279
25 0x00007ffff7693f11 in thread_starter (arg=0x9b5600) at gdk_system.c:476
26 0x00007ffff4b0250b in start_thread (arg=0x7fffbf2dc700) at pthread_create.c:465
27 0x00007ffff483a16f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Comment 26272

Date: 2018-03-15 10:37:51 +0100
From: MonetDB Mercurial Repository <>

Changeset cfe2a4fe1c9d made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

Added test for bug #6557

Comment 26276

Date: 2018-03-23 13:09:00 +0100
From: MonetDB Mercurial Repository <>

Changeset 326148a495d3 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=326148a495d3

Changeset description:

fixed bug #6557, ie properly name aggregate expressions

Comment 26320

Date: 2018-03-29 15:39:21 +0200
From: @sjoerdmullender

The Mar2018 version has been released.

Comment 26663

Date: 2018-11-06 15:01:13 +0100
From: MonetDB Mercurial Repository <>

Changeset 6d4152a6de27 made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

Added test and fix for bug #6557.

Comment 26992

Date: 2019-05-02 14:44:52 +0200
From: MonetDB Mercurial Repository <>

Changeset 1b22d2eee345 made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

Updated bug #6557 with similar query that should give an error.

The error is thrown in Apr2019 branch, but it's crashing on default, maybe because of subquery branch changes.

Comment 27198

Date: 2019-08-02 15:54:44 +0200
From: MonetDB Mercurial Repository <>

Changeset f7e5625612ef made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

Updated test for bug #6557 with failing query on default branch.

Comment 27248

Date: 2019-08-20 12:07:27 +0200
From: MonetDB Mercurial Repository <>

Changeset ad472c9f29d3 made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.

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

Changeset description:

Updated bug #6557 test with query with wrong result.
@monetdb-team monetdb-team added bug Something isn't working minor 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 minor SQL
Projects
None yet
Development

No branches or pull requests

2 participants