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 query #6568

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

Sqlitelogictest crash on complex case query #6568

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-04 16:27:57 +0200
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes, stely1936

Last updated: 2020-10-06 13:12:24 +0200

Comment 26338

Date: 2018-04-04 16:27:57 +0200
From: @PedroTadim

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

Just run the query bellow for an assertion error in rel_bin.c

Reproducible: Always

Steps to Reproduce:

  1. SELECT - 76 AS col2, CASE WHEN CAST ( - MAX ( DISTINCT - 75 ) AS INTEGER ) IS NOT NULL THEN + 4 * - + 48 * + 51 * - - 54 * - 77 * 46 WHEN NOT ( NULL ) IN ( + - ( - - 49 ) * - 1, - 41, - 14 - - CASE - - 1 WHEN - - 82 THEN - - 23 END / + 46 - - 87 * + 52 ) THEN 56 ELSE NULL END AS col2;

Actual Results:

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

Expected Results:

A single column with values -76 and 1872896256

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=0x7fffe84fd5f8 "s", file=file@entry=0x7fffe84fd588 "rel_bin.c",
line=line@entry=576, function=function@entry=0x7fffe84fddc8 <PRETTY_FUNCTION.18599> "exp_bin") at assert.c:92
3 0x00007ffff4778ff2 in __GI___assert_fail (assertion=0x7fffe84fd5f8 "s", file=0x7fffe84fd588 "rel_bin.c", line=576, function=0x7fffe84fddc8 <PRETTY_FUNCTION.18599> "exp_bin") at assert.c:101
4 0x00007fffe8383cee in exp_bin (be=0x7fffb0002b60, e=0x7fffb0223430, left=0x7fffb04d63a0, right=0x7fffb04d6510, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:576
5 0x00007fffe838cfe3 in rel2bin_project (be=0x7fffb0002b60, rel=0x7fffb022b880, refs=0x7fffb04d62c0, topn=0x0) at rel_bin.c:2481
6 0x00007fffe8398bcd in subrel_bin (be=0x7fffb0002b60, rel=0x7fffb022b880, refs=0x7fffb04d62c0) at rel_bin.c:5068
7 0x00007fffe838cf10 in rel2bin_project (be=0x7fffb0002b60, rel=0x7fffb022d430, refs=0x7fffb04d62c0, topn=0x0) at rel_bin.c:2469
8 0x00007fffe8398bcd in subrel_bin (be=0x7fffb0002b60, rel=0x7fffb022d430, refs=0x7fffb04d62c0) at rel_bin.c:5068
9 0x00007fffe8398eb5 in _subrel_bin (be=0x7fffb0002b60, rel=0x7fffb022d430, refs=0x7fffb04d62c0) at rel_bin.c:5130
10 0x00007fffe8398fcd in output_rel_bin (be=0x7fffb0002b60, rel=0x7fffb022d430) at rel_bin.c:5153
11 0x00007fffe83b5364 in sql_relation2stmt (be=0x7fffb0002b60, r=0x7fffb022d430) at sql_gencode.c:542
12 0x00007fffe83b5557 in backend_dumpstmt (be=0x7fffb0002b60, mb=0x7fffb00b2340, r=0x7fffb022d430, top=1, add_end=1,
query=0x7fffb00dc890 "select - 76 as col2, case when cast ( - max ( distinct - 75 ) as integer ) is not null then + 4 * - + 48 * + 51 * - - 54 * - 77 * 46 when not ( null ) in ( + - ( - - 49 ) * - 1, - 41, - 14 - - case - "...) at sql_gencode.c:582
13 0x00007fffe83b5dcf in backend_dumpproc (be=0x7fffb0002b60, c=0x7fffe973c368, cq=0x7fffb009a150, r=0x7fffb022d430) at sql_gencode.c:712
14 0x00007fffe8377958 in SQLparser (c=0x7fffe973c368) at sql_scenario.c:1233
15 0x00007ffff7a0f392 in runPhase (c=0x7fffe973c368, phase=1) at mal_scenario.c:510
16 0x00007ffff7a0f49b in runScenarioBody (c=0x7fffe973c368, once=0) at mal_scenario.c:532
17 0x00007ffff7a0f754 in runScenario (c=0x7fffe973c368, once=0) at mal_scenario.c:569
18 0x00007ffff7a11680 in MSserveClient (dummy=0x7fffe973c368) at mal_session.c:519
19 0x00007ffff7a1117b in MSscheduleClient (command=0x7fffb0000b30 "0", challenge=0x7fffc72e1d9b "pb9keHDd", fin=0x1805700, fout=0x7fffc0002d90, protocol=PROTOCOL_9, blocksize=8190, compute_column_widths=0)
at mal_session.c:397
20 0x00007ffff7ab22e2 in doChallenge (data=0x1805710) at mal_mapi.c:279
21 0x00007ffff7699357 in thread_starter (arg=0x9b5780) at gdk_system.c:476
22 0x00007ffff4b0950b in start_thread (arg=0x7fffc72e2700) at pthread_create.c:465
23 0x00007ffff484116f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Comment 26341

Date: 2018-04-04 17:16:18 +0200
From: MonetDB Mercurial Repository <>

Changeset 44290b405a9f 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=44290b405a9f

Changeset description:

Added tests for bugs 6568, 6569 and 6570

Comment 26350

Date: 2018-04-08 11:09:45 +0200
From: MonetDB Mercurial Repository <>

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

Changeset description:

fix bug #6568
@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