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 complex case statement #6587

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

Sqlitelogictest crash on complex case statement #6587

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-04-20 16:23:19 +0200
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2018-06-20 11:02:11 +0200

Comment 26391

Date: 2018-04-20 16:23:19 +0200
From: @PedroTadim

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

On default branch only, run the query bellow for an assertion error in rel_bin.c

Reproducible: Always

Steps to Reproduce:

  1. SELECT ALL + CASE WHEN NOT + - 10 IS NULL AND NULL IS NULL THEN NULL WHEN - - 39 * - 89 NOT IN ( - + 51 * - - 45, COUNT ( * ) / + 67 ) THEN + COUNT ( ALL 54 ) END;

Actual Results:

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

Expected Results:

An single NULL value.

Backtrace:

0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
1 0x00007ffff4781c41 in __GI_abort () at abort.c:79
2 0x00007ffff4778f7a in __assert_fail_base (fmt=0x7ffff48c9260 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fffe84fdb98 "s", file=file@entry=0x7fffe84fdb28 "rel_bin.c",
line=line@entry=605, function=function@entry=0x7fffe84fe368 <PRETTY_FUNCTION.18631> "exp_bin") at assert.c:92
3 0x00007ffff4778ff2 in __GI___assert_fail (assertion=0x7fffe84fdb98 "s", file=0x7fffe84fdb28 "rel_bin.c", line=605, function=0x7fffe84fe368 <PRETTY_FUNCTION.18631> "exp_bin") at assert.c:101
4 0x00007fffe8382226 in exp_bin (be=0x7fffb0002b60, e=0x7fffb00f6df0, left=0x7fffb00febe0, right=0x7fffb00fed10, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:605
5 0x00007fffe8381612 in exp_bin (be=0x7fffb0002b60, e=0x7fffb00f9830, left=0x7fffb00febe0, right=0x7fffb00fed10, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:480
6 0x00007fffe8381612 in exp_bin (be=0x7fffb0002b60, e=0x7fffb00f9b60, left=0x7fffb00febe0, right=0x7fffb00fed10, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:480
7 0x00007fffe8381612 in exp_bin (be=0x7fffb0002b60, e=0x7fffb00f9fe0, left=0x7fffb00febe0, right=0x7fffb00fed10, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:480
8 0x00007fffe8381612 in exp_bin (be=0x7fffb0002b60, e=0x7fffb00fa070, left=0x7fffb00febe0, right=0x7fffb00fed10, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:480
9 0x00007fffe838b536 in rel2bin_project (be=0x7fffb0002b60, rel=0x7fffb00f2ee0, refs=0x7fffb00fdfb0, topn=0x0) at rel_bin.c:2510
10 0x00007fffe8397120 in subrel_bin (be=0x7fffb0002b60, rel=0x7fffb00f2ee0, refs=0x7fffb00fdfb0) at rel_bin.c:5097
11 0x00007fffe838b463 in rel2bin_project (be=0x7fffb0002b60, rel=0x7fffb00f8190, refs=0x7fffb00fdfb0, topn=0x0) at rel_bin.c:2498
12 0x00007fffe8397120 in subrel_bin (be=0x7fffb0002b60, rel=0x7fffb00f8190, refs=0x7fffb00fdfb0) at rel_bin.c:5097
13 0x00007fffe8397413 in _subrel_bin (be=0x7fffb0002b60, rel=0x7fffb00f8190, refs=0x7fffb00fdfb0) at rel_bin.c:5160
14 0x00007fffe8397526 in output_rel_bin (be=0x7fffb0002b60, rel=0x7fffb00f8190) at rel_bin.c:5183
15 0x00007fffe83b4359 in sql_relation2stmt (be=0x7fffb0002b60, r=0x7fffb00f8190) at sql_gencode.c:608
16 0x00007fffe83b454c in backend_dumpstmt (be=0x7fffb0002b60, mb=0x7fffb0111ed0, r=0x7fffb00f8190, top=1, add_end=1,
query=0x7fffb0112090 "select all + case when not + - 10 is null and null is null then null when - - 39 * - 89\nnot in ( - + 51 * - - 45, count ( * ) / + 67 ) then + count ( all 54 ) end;")
at sql_gencode.c:648
17 0x00007fffe83b4dc4 in backend_dumpproc (be=0x7fffb0002b60, c=0x7fffe973c368, cq=0x7fffb0116700, r=0x7fffb00f8190) at sql_gencode.c:778
18 0x00007fffe837588d in SQLparser (c=0x7fffe973c368) at sql_scenario.c:1233
19 0x00007ffff7a0d9eb in runPhase (c=0x7fffe973c368, phase=1) at mal_scenario.c:510
20 0x00007ffff7a0daf4 in runScenarioBody (c=0x7fffe973c368, once=0) at mal_scenario.c:532
21 0x00007ffff7a0ddad in runScenario (c=0x7fffe973c368, once=0) at mal_scenario.c:569
22 0x00007ffff7a0fcdf in MSserveClient (dummy=0x7fffe973c368) at mal_session.c:519
23 0x00007ffff7a0f7d4 in MSscheduleClient (command=0x7fffb0000b30 "0", challenge=0x7fffc72ecd9b "o0Tk43R22u", fin=0x1819dd0, fout=0x7fffc0002d90, protocol=PROTOCOL_9, blocksize=8190, compute_column_widths=0)
at mal_session.c:397
24 0x00007ffff7ab150e in doChallenge (data=0x1819de0) at mal_mapi.c:279
25 0x00007ffff769787c in thread_starter (arg=0x9c7cc0) at gdk_system.c:476
26 0x00007ffff4b0950b in start_thread (arg=0x7fffc72ed700) at pthread_create.c:465
27 0x00007ffff484116f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Comment 26392

Date: 2018-04-20 16:24:05 +0200
From: MonetDB Mercurial Repository <>

Changeset 98e9ba8965ca 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=98e9ba8965ca

Changeset description:

Added test for bug #6587

Comment 26399

Date: 2018-04-21 15:50:53 +0200
From: MonetDB Mercurial Repository <>

Changeset 30a19086985a 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=30a19086985a

Changeset description:

fixes for bug #6587
@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