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 a complex SELECT query #6330

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

Sqlitelogictest crash on a complex SELECT query #6330

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

Comments

@monetdb-team
Copy link

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

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

Last updated: 2017-07-17 16:07:31 +0200

Comment 25369

Date: 2017-06-01 12:14:01 +0200
From: @PedroTadim

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

Mserver crashes with an assertion query in a SELECT query without the FROM clause.

Reproducible: Always

Steps to Reproduce:

  1. SELECT 45 - - CASE + + 70 WHEN COUNT ( * ) + SUM ( DISTINCT 91 ) + MIN ( DISTINCT 41 ) / 65 THEN + 98 END * + - 0 - - COUNT ( * ) AS col0;

Actual Results:

The server gets an assertion error and crashes.

Expected Results:

A single NULL value in the result set.

Error log:

2017-06-01 12:05:31 ERR db[26005]: could not find L3.L3
2017-06-01 12:05:31 ERR db[26005]: mserver5: rel_bin.c:2708: rel2bin_groupby: Assertion `0' failed.
2017-06-01 12:05:35 MSG merovingian[31068]: database 'db' (26005) has crashed (dumped core)

Backtrace:

0 0x00007ffff4b6591f in raise () from /lib64/libc.so.6
1 0x00007ffff4b6751a in abort () from /lib64/libc.so.6
2 0x00007ffff4b5dda7 in __assert_fail_base () from /lib64/libc.so.6
3 0x00007ffff4b5de52 in __assert_fail () from /lib64/libc.so.6
4 0x00007fffe5a8cfbe in rel2bin_groupby (be=0x7fffac0cb0c0, rel=0x7fffac0e1ee0, refs=0x7fffac0ea360) at rel_bin.c:2708
5 0x00007fffe5a96264 in subrel_bin (be=0x7fffac0cb0c0, rel=0x7fffac0e1ee0, refs=0x7fffac0ea360) at rel_bin.c:4797
6 0x00007fffe5a8bac1 in rel2bin_project (be=0x7fffac0cb0c0, rel=0x7fffac0e2200, refs=0x7fffac0ea360, topn=0x0) at rel_bin.c:2418
7 0x00007fffe5a96208 in subrel_bin (be=0x7fffac0cb0c0, rel=0x7fffac0e2200, refs=0x7fffac0ea360) at rel_bin.c:4789
8 0x00007fffe5a964ff in output_rel_bin (be=0x7fffac0cb0c0, rel=0x7fffac0e2200) at rel_bin.c:4854
9 0x00007fffe5ab00b7 in sql_relation2stmt (be=0x7fffac0cb0c0, r=0x7fffac0e2200) at sql_gencode.c:472
10 0x00007fffe5ab0416 in backend_dumpstmt (be=0x7fffac0cb0c0, mb=0x7fffac0cb680, r=0x7fffac0e2200, top=1, add_end=0,
query=0x7fffac109d20 "select 45 - - case + + 70 when count ( * ) + sum ( distinct 91 ) + min ( distinct 41 ) / 65 then + 98 end * + - 0 - - count ( * ) as col0;") at sql_gencode.c:513
11 0x00007fffe5a76f83 in SQLparser (c=0x7fffe7140338) at sql_scenario.c:1119
12 0x00007ffff7a1aab7 in runPhase (c=0x7fffe7140338, phase=1) at mal_scenario.c:517
13 0x00007ffff7a1abfb in runScenarioBody (c=0x7fffe7140338) at mal_scenario.c:550
14 0x00007ffff7a1ad9e in runScenario (c=0x7fffe7140338) at mal_scenario.c:579
15 0x00007ffff7a1c844 in MSserveClient (dummy=0x7fffe7140338) at mal_session.c:462
16 0x00007ffff7a1c334 in MSscheduleClient (command=0x7fffac0008d0 "0", challenge=0x7fffc2269df0 "J3gbRCwmGp", fin=0x7fffac002990, fout=0x7fffb8002b70, protocol=PROTOCOL_9, blocksize=8190,
compute_column_widths=0) at mal_session.c:353
17 0x00007ffff7abd4cc in doChallenge (data=0x7fffb80008d0) at mal_mapi.c:269
18 0x00007ffff76a24f3 in thread_starter (arg=0x7fffb8004c60) at gdk_system.c:485
19 0x00007ffff4efd6ca in start_thread () from /lib64/libpthread.so.0
20 0x00007ffff4c37f7f in clone () from /lib64/libc.so.6

Comment 25371

Date: 2017-06-03 13:01:37 +0200
From: MonetDB Mercurial Repository <>

Changeset 9a36e7f9cd0b made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=9a36e7f9cd0b

Changeset description:

fixed bug #6330, ie do not clean expression which are later used in same
the projection.

Comment 25389

Date: 2017-06-22 14:10:34 +0200
From: MonetDB Mercurial Repository <>

Changeset 5a7ed5bff986 made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5a7ed5bff986

Changeset description:

Add and approve output files for bug #6330

Comment 25393

Date: 2017-06-25 12:03:17 +0200
From: MonetDB Mercurial Repository <>

Changeset 94b5d2589cba made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=94b5d2589cba

Changeset description:

fix bug #6330, ie handle null*0 in times Zero optimization.
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