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 in aggregation query with a NOT IN clause #6416

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

Sqlitelogictest crash in aggregation query with a NOT IN clause #6416

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

Comments

@monetdb-team
Copy link

Date: 2017-10-12 10:30:06 +0200
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

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

Comment 25696

Date: 2017-10-12 10:30:06 +0200
From: @PedroTadim

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

The server gets an assertion error in an complex aggregation query with a NOT IN clause.

Reproducible: Always

Steps to Reproduce:

  1. CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER);
  2. SELECT ALL - 89 FROM tab2 GROUP BY col1, col1 HAVING - CAST ( NULL AS INTEGER ) * + - 17 + + - COUNT ( * ) NOT IN ( + MAX ( 44 ) );

Actual Results:

Mserver5 gets an assertion error.

Expected Results:

An empty result set.

The assertion error:

mserver5: rel_bin.c:564: exp_bin: Assertion `s' failed.

Backtrace:

0 0x00007ffff490269b in raise () from /lib64/libc.so.6
1 0x00007ffff49044a0 in abort () from /lib64/libc.so.6
2 0x00007ffff48fad5a in __assert_fail_base () from /lib64/libc.so.6
3 0x00007ffff48fadd2 in __assert_fail () from /lib64/libc.so.6
4 0x00007fffe8a43e44 in exp_bin (be=0x7fffb80dddd0, e=0x7fffb80eb430, left=0x7fffb80f26f0, right=0x7fffb80f2880, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:564
5 0x00007fffe8a4d0ac in rel2bin_project (be=0x7fffb80dddd0, rel=0x7fffb80eb4a0, refs=0x7fffb80f0f10, topn=0x0) at rel_bin.c:2462
6 0x00007fffe8a57e66 in subrel_bin (be=0x7fffb80dddd0, rel=0x7fffb80eb4a0, refs=0x7fffb80f0f10) at rel_bin.c:4831
7 0x00007fffe8a4a85f in rel2bin_semijoin (be=0x7fffb80dddd0, rel=0x7fffb80eb830, refs=0x7fffb80f0f10) at rel_bin.c:1926
8 0x00007fffe8a57dac in subrel_bin (be=0x7fffb80dddd0, rel=0x7fffb80eb830, refs=0x7fffb80f0f10) at rel_bin.c:4815
9 0x00007fffe8a4cfd9 in rel2bin_project (be=0x7fffb80dddd0, rel=0x7fffb80e86e0, refs=0x7fffb80f0f10, topn=0x0) at rel_bin.c:2450
10 0x00007fffe8a57e66 in subrel_bin (be=0x7fffb80dddd0, rel=0x7fffb80e86e0, refs=0x7fffb80f0f10) at rel_bin.c:4831
11 0x00007fffe8a5815d in output_rel_bin (be=0x7fffb80dddd0, rel=0x7fffb80e86e0) at rel_bin.c:4896
12 0x00007fffe8a733a8 in sql_relation2stmt (be=0x7fffb80dddd0, r=0x7fffb80e86e0) at sql_gencode.c:529
13 0x00007fffe8a73727 in backend_dumpstmt (be=0x7fffb80dddd0, mb=0x7fffb80e0ca0, r=0x7fffb80e86e0, top=1, add_end=0,
query=0x7fffb80ddec0 "select all - 89 from tab2 group by col1, col1 having - cast ( null as integer ) * + - 17 + + - count ( * ) not in ( + max ( 44 ) );") at sql_gencode.c:576
14 0x00007fffe8a37b26 in SQLparser (c=0x7fffea11e338) at sql_scenario.c:1146
15 0x00007ffff7a15baa in runPhase (c=0x7fffea11e338, phase=1) at mal_scenario.c:506
16 0x00007ffff7a15cee in runScenarioBody (c=0x7fffea11e338) at mal_scenario.c:539
17 0x00007ffff7a15e91 in runScenario (c=0x7fffea11e338) at mal_scenario.c:568
18 0x00007ffff7a17a46 in MSserveClient (dummy=0x7fffea11e338) at mal_session.c:473
19 0x00007ffff7a17536 in MSscheduleClient (command=0x7fffb80008d0 "0", challenge=0x7fffcd396deb "nuLOFQd2ohy", fin=0x7fffb80028f0, fout=0x7fffc4002b70, protocol=PROTOCOL_9, blocksize=8190,
compute_column_widths=0) at mal_session.c:364
20 0x00007ffff7aba965 in doChallenge (data=0x7fffc40008d0) at mal_mapi.c:273
21 0x00007ffff7690ae4 in thread_starter (arg=0x7fffc4004c60) at gdk_system.c:485
22 0x00007ffff4ca436d in start_thread () from /lib64/libpthread.so.0
23 0x00007ffff49dcbbf in clone () from /lib64/libc.so.6

Comment 25697

Date: 2017-10-12 10:40:25 +0200
From: MonetDB Mercurial Repository <>

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

Changeset description:

Added test for bug #6416

Comment 25701

Date: 2017-10-14 17:03:24 +0200
From: MonetDB Mercurial Repository <>

Changeset 9dbd05ca313b 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=9dbd05ca313b

Changeset description:

fix bug #6416, make sure we handle a wrapping select and project in the groupby/aggregate code.

Comment 25702

Date: 2017-10-14 17:03:59 +0200
From: @njnes

fixed. The missing projection column is now added in the rel_aggr code

@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 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 normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants