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 #6428

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

Sqlitelogictest crash in aggregation query #6428

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

Comments

@monetdb-team
Copy link

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

Date: 2017-10-16 10:16:35 +0200
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

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

Comment 25739

Date: 2017-10-16 10:16:35 +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 failure while compiling a sqlitelogictest aggregation query.

Reproducible: Always

Steps to Reproduce:

  1. CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER);
  2. SELECT - col0 AS col1 FROM tab0 AS cor0 WHERE NOT + col0 IS NOT NULL GROUP BY col1, col0 HAVING NOT - col1 + + AVG ( DISTINCT col0 ) IS NULL;

Actual Results:

Servers gets an assertion failure in an exp_bin function call.

Expected Results:

An empty result set.

Assertion error:

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

Backtrace:

0 0x00007ffff490169b in raise () from /lib64/libc.so.6
1 0x00007ffff49034a0 in abort () from /lib64/libc.so.6
2 0x00007ffff48f9d5a in __assert_fail_base () from /lib64/libc.so.6
3 0x00007ffff48f9dd2 in __assert_fail () from /lib64/libc.so.6
4 0x00007fffe8a42e94 in exp_bin (be=0x7fffb80dddd0, e=0x7fffb80ebbc0, left=0x7fffb80ed060, right=0x7fffb80ed490, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:564
5 0x00007fffe8a4d55e in rel2bin_groupby (be=0x7fffb80dddd0, rel=0x7fffb80ebc70, refs=0x7fffb80ec670) at rel_bin.c:2741
6 0x00007fffe8a56f6d in subrel_bin (be=0x7fffb80dddd0, rel=0x7fffb80ebc70, refs=0x7fffb80ec670) at rel_bin.c:4842
7 0x00007fffe8a4d003 in rel2bin_groupby (be=0x7fffb80dddd0, rel=0x7fffb80e8ae0, refs=0x7fffb80ec670) at rel_bin.c:2670
8 0x00007fffe8a56f6d in subrel_bin (be=0x7fffb80dddd0, rel=0x7fffb80e8ae0, refs=0x7fffb80ec670) at rel_bin.c:4842
9 0x00007fffe8a4cad8 in rel2bin_select (be=0x7fffb80dddd0, rel=0x7fffb80ea6f0, refs=0x7fffb80ec670) at rel_bin.c:2589
10 0x00007fffe8a56f3f in subrel_bin (be=0x7fffb80dddd0, rel=0x7fffb80ea6f0, refs=0x7fffb80ec670) at rel_bin.c:4838
11 0x00007fffe8a4c084 in rel2bin_project (be=0x7fffb80dddd0, rel=0x7fffb80e8de0, refs=0x7fffb80ec670, topn=0x0) at rel_bin.c:2453
12 0x00007fffe8a56f11 in subrel_bin (be=0x7fffb80dddd0, rel=0x7fffb80e8de0, refs=0x7fffb80ec670) at rel_bin.c:4834
13 0x00007fffe8a4c084 in rel2bin_project (be=0x7fffb80dddd0, rel=0x7fffb80eab00, refs=0x7fffb80ec670, topn=0x0) at rel_bin.c:2453
14 0x00007fffe8a56f11 in subrel_bin (be=0x7fffb80dddd0, rel=0x7fffb80eab00, refs=0x7fffb80ec670) at rel_bin.c:4834
15 0x00007fffe8a57208 in output_rel_bin (be=0x7fffb80dddd0, rel=0x7fffb80eab00) at rel_bin.c:4899
16 0x00007fffe8a72453 in sql_relation2stmt (be=0x7fffb80dddd0, r=0x7fffb80eab00) at sql_gencode.c:529
17 0x00007fffe8a727d2 in backend_dumpstmt (be=0x7fffb80dddd0, mb=0x7fffb810ae70, r=0x7fffb80eab00, top=1, add_end=1,
query=0x7fffb810fe80 "select - col0 as col1 from tab0 as cor0 where not + col0 is not null group by col1, col0 having not - col1 + + avg ( distinct col0 ) is null;") at sql_gencode.c:576
18 0x00007fffe8a73037 in backend_dumpproc (be=0x7fffb80dddd0, c=0x7fffea11d338, cq=0x7fffb80ddec0, r=0x7fffb80eab00) at sql_gencode.c:703
19 0x00007fffe8a36ee5 in SQLparser (c=0x7fffea11d338) at sql_scenario.c:1182
20 0x00007ffff7a14da0 in runPhase (c=0x7fffea11d338, phase=1) at mal_scenario.c:506
21 0x00007ffff7a14ee4 in runScenarioBody (c=0x7fffea11d338) at mal_scenario.c:539
22 0x00007ffff7a15087 in runScenario (c=0x7fffea11d338) at mal_scenario.c:568
23 0x00007ffff7a16c3c in MSserveClient (dummy=0x7fffea11d338) at mal_session.c:473
24 0x00007ffff7a1672c in MSscheduleClient (command=0x7fffb80008d0 "0", challenge=0x7fffcd395deb "zJlfcarIywQ", fin=0x7fffb80028f0, fout=0x7fffc4002b70, protocol=PROTOCOL_9, blocksize=8190,
compute_column_widths=0) at mal_session.c:364
25 0x00007ffff7ab9ba6 in doChallenge (data=0x7fffc40008d0) at mal_mapi.c:273
26 0x00007ffff768fae4 in thread_starter (arg=0x7fffc4004c60) at gdk_system.c:485
27 0x00007ffff4ca336d in start_thread () from /lib64/libpthread.so.0
28 0x00007ffff49dbbbf in clone () from /lib64/libc.so.6

Comment 25740

Date: 2017-10-16 10:19:50 +0200
From: MonetDB Mercurial Repository <>

Changeset 725d659cb419 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=725d659cb419

Changeset description:

Added test for bug #6428

Comment 25743

Date: 2017-10-16 15:51:26 +0200
From: MonetDB Mercurial Repository <>

Changeset 0900833d1a87 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=0900833d1a87

Changeset description:

fixed bug #6428, ie don't remove groupby if the alias is different
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