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 select query with IN operator and cast #6529

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

Sqlitelogictest crash in select query with IN operator and cast #6529

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-02-01 10:43:39 +0100
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2018-03-29 15:39:17 +0200

Comment 26155

Date: 2018-02-01 10:43:39 +0100
From: @PedroTadim

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

Mserver gets an assertion error in rel_bin.c with the following query bellow.

Reproducible: Always

Steps to Reproduce:

  1. CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER);
  2. INSERT INTO tab2 VALUES (64,77,40), (75,67,58), (46,51,23);
  3. SELECT * FROM tab2 cor0 WHERE col1 IN ( + CAST ( NULL AS INTEGER ) + - CAST ( NULL AS INTEGER ), col2 * + col1 + - - 30 );

Actual Results:

The following assertion error:
mserver5: rel_bin.c:575: exp_bin: Assertion `s' failed.

Expected Results:

An empty result set.

Backtrace:

0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
1 0x00007ffff4748381 in __GI_abort () at abort.c:79
2 0x00007ffff473e8fa in __assert_fail_base (fmt=0x7ffff48b9c28 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fffe84cce68 "s", file=file@entry=0x7fffe84ccdf8 "rel_bin.c",
line=line@entry=575, function=function@entry=0x7fffe84cd548 <PRETTY_FUNCTION.15580> "exp_bin") at assert.c:92
3 0x00007ffff473e972 in __GI___assert_fail (assertion=0x7fffe84cce68 "s", file=0x7fffe84ccdf8 "rel_bin.c", line=575, function=0x7fffe84cd548 <PRETTY_FUNCTION.15580> "exp_bin") at assert.c:101
4 0x00007fffe835963a in exp_bin (be=0x7fffb4002b60, e=0x7fffb40f49f0, left=0x7fffb40fbdf0, right=0x7fffb40fc420, grp=0x0, ext=0x0, cnt=0x0, sel=0x0) at rel_bin.c:575
5 0x00007fffe836292f in rel2bin_project (be=0x7fffb4002b60, rel=0x7fffb40f4a80, refs=0x7fffb40f97f0, topn=0x0) at rel_bin.c:2479
6 0x00007fffe836d73c in subrel_bin (be=0x7fffb4002b60, rel=0x7fffb40f4a80, refs=0x7fffb40f97f0) at rel_bin.c:4856
7 0x00007fffe836285c in rel2bin_project (be=0x7fffb4002b60, rel=0x7fffb40f7910, refs=0x7fffb40f97f0, topn=0x0) at rel_bin.c:2467
8 0x00007fffe836d73c in subrel_bin (be=0x7fffb4002b60, rel=0x7fffb40f7910, refs=0x7fffb40f97f0) at rel_bin.c:4856
9 0x00007fffe836101e in rel2bin_union (be=0x7fffb4002b60, rel=0x7fffb40f6a00, refs=0x7fffb40f97f0) at rel_bin.c:2158
10 0x00007fffe836d6b0 in subrel_bin (be=0x7fffb4002b60, rel=0x7fffb40f6a00, refs=0x7fffb40f97f0) at rel_bin.c:4844
11 0x00007fffe836004f in rel2bin_semijoin (be=0x7fffb4002b60, rel=0x7fffb40f33a0, refs=0x7fffb40f97f0) at rel_bin.c:1937
12 0x00007fffe836d682 in subrel_bin (be=0x7fffb4002b60, rel=0x7fffb40f33a0, refs=0x7fffb40f97f0) at rel_bin.c:4840
13 0x00007fffe836285c in rel2bin_project (be=0x7fffb4002b60, rel=0x7fffb40f3440, refs=0x7fffb40f97f0, topn=0x0) at rel_bin.c:2467
14 0x00007fffe836d73c in subrel_bin (be=0x7fffb4002b60, rel=0x7fffb40f3440, refs=0x7fffb40f97f0) at rel_bin.c:4856
15 0x00007fffe836d9e4 in _subrel_bin (be=0x7fffb4002b60, rel=0x7fffb40f3440, refs=0x7fffb40f97f0) at rel_bin.c:4913
16 0x00007fffe836dafc in output_rel_bin (be=0x7fffb4002b60, rel=0x7fffb40f3440) at rel_bin.c:4936
17 0x00007fffe8389f9b in sql_relation2stmt (be=0x7fffb4002b60, r=0x7fffb40f3440) at sql_gencode.c:532
18 0x00007fffe838a18e in backend_dumpstmt (be=0x7fffb4002b60, mb=0x7fffb4101220, r=0x7fffb40f3440, top=1, add_end=1,
query=0x7fffb40feb30 "select * from tab2 cor0 where col1 in ( + cast ( null as integer ) + - cast ( null as integer ), col2 * + col1 + - - 30 );") at sql_gencode.c:572
19 0x00007fffe838aa06 in backend_dumpproc (be=0x7fffb4002b60, c=0x7fffe970e368, cq=0x7fffb4105a00, r=0x7fffb40f3440) at sql_gencode.c:702
20 0x00007fffe834db2f in SQLparser (c=0x7fffe970e368) at sql_scenario.c:1226
21 0x00007ffff7a0ca7b in runPhase (c=0x7fffe970e368, phase=1) at mal_scenario.c:510
22 0x00007ffff7a0cb84 in runScenarioBody (c=0x7fffe970e368, once=0) at mal_scenario.c:532
23 0x00007ffff7a0ce3d in runScenario (c=0x7fffe970e368, once=0) at mal_scenario.c:569
24 0x00007ffff7a0ed78 in MSserveClient (dummy=0x7fffe970e368) at mal_session.c:514
25 0x00007ffff7a0e8c7 in MSscheduleClient (command=0x7fffb4000b30 "0", challenge=0x7fffcb3b3d9b "U2YlY6LW", fin=0x17fc5f0, fout=0x7fffc4002d90, protocol=PROTOCOL_9, blocksize=8190, compute_column_widths=0)
at mal_session.c:397
26 0x00007ffff7aae933 in doChallenge (data=0x17fc600) at mal_mapi.c:284
27 0x00007ffff7694aca in thread_starter (arg=0x7fffc4004e80) at gdk_system.c:475
28 0x00007ffff4af961b in start_thread (arg=0x7fffcb3b4700) at pthread_create.c:465
29 0x00007ffff482698f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Comment 26157

Date: 2018-02-01 10:59:19 +0100
From: MonetDB Mercurial Repository <>

Changeset 165307be5363 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=165307be5363

Changeset description:

Added tests for bugs 6529 and 6530

Comment 26216

Date: 2018-02-18 16:17:37 +0100
From: MonetDB Mercurial Repository <>

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

Changeset description:

fixes for bug #6529 and 6530, ie do not set the tnonil flag (nil in gives nil hash values).

Comment 26221

Date: 2018-02-19 10:46:33 +0100
From: @PedroTadim

This query still crashes when I compile MonetDB without hugeint support.

Comment 26236

Date: 2018-03-01 19:30:42 +0100
From: MonetDB Mercurial Repository <>

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

Changeset description:

more fixes for bug #6529, make sure the identity column expressions are unique

Comment 26237

Date: 2018-03-01 19:31:06 +0100
From: @njnes

fixed

Comment 26316

Date: 2018-03-29 15:39:17 +0200
From: @sjoerdmullender

The Mar2018 version has been released.

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