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

sqllogictest crash on aggregation query with NOT IN clause in HAVING clause #6409

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

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2017-09-20 11:00:13 +0200
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

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

Comment 25656

Date: 2017-09-20 11:00:13 +0200
From: @PedroTadim

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

The server receives a SIGABRT signal on an aggregation query with a NOT IN condition in the HAVING clause. Tested on the latest development version of the Jul2017 branch.

Reproducible: Always

Steps to Reproduce:

  1. CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER);
  2. SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NULL NOT IN ( - cor0.col1 );

Actual Results:

The server receives a SIGABRT signal from an assert(0) call in exp_bin.

Expected Results:

An empty result set.

Backtrace of the assertion error:

0 0x00007ffff490369b in raise () from /lib64/libc.so.6
1 0x00007ffff49054a0 in abort () from /lib64/libc.so.6
2 0x00007ffff48fbd5a in __assert_fail_base () from /lib64/libc.so.6
3 0x00007ffff48fbdd2 in __assert_fail () from /lib64/libc.so.6
4 0x00007fffe8a46f1c in exp_bin (be=0x7fffb80cb0c0, e=0x7fffb80e27f0, left=0x7fffb80e4f90, right=0x7fffb80e5660, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:721
5 0x00007fffe8a4c918 in rel2bin_semijoin (be=0x7fffb80cb0c0, rel=0x7fffb80e2750, refs=0x7fffb80e4440) at rel_bin.c:1943
6 0x00007fffe8a59c71 in subrel_bin (be=0x7fffb80cb0c0, rel=0x7fffb80e2750, refs=0x7fffb80e4440) at rel_bin.c:4802
7 0x00007fffe8a4ee9e in rel2bin_project (be=0x7fffb80cb0c0, rel=0x7fffb80e16c0, refs=0x7fffb80e4440, topn=0x0) at rel_bin.c:2437
8 0x00007fffe8a59d2b in subrel_bin (be=0x7fffb80cb0c0, rel=0x7fffb80e16c0, refs=0x7fffb80e4440) at rel_bin.c:4818
9 0x00007fffe8a5a022 in output_rel_bin (be=0x7fffb80cb0c0, rel=0x7fffb80e16c0) at rel_bin.c:4883
10 0x00007fffe8a751fd in sql_relation2stmt (be=0x7fffb80cb0c0, r=0x7fffb80e16c0) at sql_gencode.c:529
11 0x00007fffe8a7557c in backend_dumpstmt (be=0x7fffb80cb0c0, mb=0x7fffb8112c90, r=0x7fffb80e16c0, top=1, add_end=1,
query=0x7fffb8109c70 "select cor0.col1 from tab1 as cor0 group by cor0.col1 having null not in ( - cor0.col1 );") at sql_gencode.c:576
12 0x00007fffe8a75de1 in backend_dumpproc (be=0x7fffb80cb0c0, c=0x7fffea11f338, cq=0x7fffb810fb30, r=0x7fffb80e16c0) at sql_gencode.c:703
13 0x00007fffe8a39e8a in SQLparser (c=0x7fffea11f338) at sql_scenario.c:1182
14 0x00007ffff7a15768 in runPhase (c=0x7fffea11f338, phase=1) at mal_scenario.c:506
15 0x00007ffff7a158ac in runScenarioBody (c=0x7fffea11f338) at mal_scenario.c:539
16 0x00007ffff7a15a4f in runScenario (c=0x7fffea11f338) at mal_scenario.c:568
17 0x00007ffff7a17541 in MSserveClient (dummy=0x7fffea11f338) at mal_session.c:467
18 0x00007ffff7a17031 in MSscheduleClient (command=0x7fffb80008d0 "0", challenge=0x7fffcdc79deb "w2acK2pZ", fin=0x7fffb80028f0, fout=0x7fffc4002b70, protocol=PROTOCOL_9, blocksize=8190,
compute_column_widths=0) at mal_session.c:358
19 0x00007ffff7aba3c1 in doChallenge (data=0x7fffc40008d0) at mal_mapi.c:273
20 0x00007ffff769180c in thread_starter (arg=0x7fffc4004c60) at gdk_system.c:485
21 0x00007ffff4ca536d in start_thread () from /lib64/libpthread.so.0
22 0x00007ffff49ddbbf in clone () from /lib64/libc.so.6

Comment 25661

Date: 2017-09-20 12:11:52 +0200
From: MonetDB Mercurial Repository <>

Changeset ca1758c8b9b8 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=ca1758c8b9b8

Changeset description:

Added test for bug #6409

Comment 25663

Date: 2017-09-21 09:39:57 +0200
From: MonetDB Mercurial Repository <>

Changeset 86be4d50523b 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=86be4d50523b

Changeset description:

fixes for bug #6409

Comment 25664

Date: 2017-09-21 09:41:36 +0200
From: @njnes

fixed. Make sure c-expressions structures are unique, ie create aliases where needed

Comment 25668

Date: 2017-09-27 16:35:24 +0200
From: MonetDB Mercurial Repository <>

Changeset 7a69de77b1b3 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=7a69de77b1b3

Changeset description:

fixes for bugs 6409 and 6410. Only set subquery flags when realy needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant