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

query with ifthenelse() crashes mserver5 #6815

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

query with ifthenelse() crashes mserver5 #6815

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

Comments

@monetdb-team
Copy link

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

Date: 2020-01-30 13:59:04 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.35.9 (Nov2019-SP1)
CC: @PedroTadim

Last updated: 2020-02-21 12:36:58 +0100

Comment 27533

Date: 2020-01-30 13:59:04 +0100
From: Martin van Dinther <<martin.van.dinther>>

User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
Build Identifier:

following 2 sql commands let mserver5 crash.

create table t6815 (type_digits int);
select ifthenelse((type_digits > 0), '('||type_digits||')', '') as opt_len from t6815;

Reproducible: Always

Steps to Reproduce:

  1. start mserver5
  2. start mclient
  3. run sql commands:
    create table t6815 (type_digits int);
    select ifthenelse((type_digits > 0), '('||type_digits||')', '') as opt_len from t6815;

Actual Results:

builtin opt gdk_dbpath = /home/dinther/dev/dev/INSTALL/var/monetdb5/dbfarm/demo
builtin opt mapi_port = 50000
builtin opt mapi_open = false
builtin opt mapi_ipv6 = false
builtin opt mapi_autosense = false
builtin opt sql_optimizer = default_pipe
builtin opt sql_debug = 0
cmdline opt embedded_r = true
cmdline opt embedded_py = 3
cmdline opt embedded_c = true
cmdline opt mapi_port = 41000
MonetDB 5 server v11.35.10 (hg id: 5560e86e5fdf)
This is an unreleased version
Serving database 'demo', using 8 threads
Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
Found 31.243 GiB available main-memory of which we use 25.463 GiB
Copyright (c) 1993 - July 2008 CWI.
Copyright (c) August 2008 - 2020 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Listening for connection requests on mapi:monetdb://127.0.0.1:41000/
MonetDB/GIS module loaded
MonetDB/SQL module loaded
MonetDB/Python3 module loaded
MonetDB/R module loaded
./start_INSTALL_mserver5.sh: line 8: 15990 Segmentation fault (core dumped) /home/dinther/dev/dev/INSTALL/bin/mserver5 -d10 --set embedded_r=true --set embedded_py=3 --set embedded_c=true --set mapi_port=41000

Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.35.10 (hg id: 5560e86e5fdf), 'demo'
FOLLOW US on https://twitter.com/MonetDB or https://github.com/MonetDB/MonetDB
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>create table t6815 (type_digits int);
operation successful
sql>select ifthenelse((type_digits > 0), '('||type_digits||')', '') as opt_len from t6815;
sql>
write error on stream
[home ~]$

Expected Results:

no crash of mserver5 please

Comment 27534

Date: 2020-01-30 15:20:59 +0100
From: MonetDB Mercurial Repository <>

Changeset 45734606a35c 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=45734606a35c

Changeset description:

Compilation fix and added test for bug #6815

Comment 27535

Date: 2020-01-30 16:00:34 +0100
From: MonetDB Mercurial Repository <>

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

Changeset description:

Fix for bug #6815, ie call exp_subtype to get the type of an expression instead of differentiating the 'tpe' field, because for e_func and e_aggr, it's not stored in there
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