SQL Query:
SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a2 ELSE b10 END FROM t1;
causes assertion failure
Reproducible: Always
Steps to Reproduce:
Start mserver5 (MonetDB 5 server v11.19.9 "Oct2014-SP2")
Start mclient
execute SQL commands:
CREATE TABLE t1(a INTEGER, b INTEGER, c INTEGER, d INTEGER, e INTEGER);
INSERT INTO t1(e,c,b,d,a) VALUES(103,102,100,101,104);
SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a2 ELSE b10 END FROM t1;
Actual Results:
builtin opt gdk_dbpath = /export/scratch1/dinther/Downloads/INSTALL/var/monetdb5/dbfarm/demo
builtin opt gdk_debug = 0
builtin opt gdk_vmtrim = no
builtin opt monet_prompt = >
builtin opt monet_daemon = no
builtin opt mapi_port = 50000
builtin opt mapi_open = false
builtin opt mapi_autosense = false
builtin opt sql_optimizer = default_pipe
builtin opt sql_debug = 0
cmdline opt gdk_debug = 10
MonetDB 5 server v11.19.9 "Oct2014-SP2"
Serving database 'demo', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
Found 15.590 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
MonetDB/GIS module loaded
MonetDB/SQL module loaded
could not find t1.a
t1.c
L1.L1
mserver5: ../../../../MonetDB-11.19.9/sql/backends/monet5/rel_bin.c:2274: rel2bin_project: Assertion `0' failed.
bash-4.2$
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.19.9 (Oct2014-SP2), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>CREATE TABLE t1(a INTEGER, b INTEGER, c INTEGER, d INTEGER, e INTEGER);
operation successful (7.575ms)
sql>INSERT INTO t1(e,c,b,d,a) VALUES(103,102,100,101,104);
1 affected row (1.117ms)
sql>SELECT avg(c) FROM t1;
+--------------------------+
| L1 |
+==========================+
| 102 |
+--------------------------+
1 tuple (1.247ms)
sql>SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a2 ELSE b10 END FROM t1;
sql>
bash-4.2$
Expected Results:
no assertion failure
Also happens on MonetDB 5 server v11.20.0:
mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2234: rel2bin_project: Assertion `0' failed.
Fixed (properly pass all projection expressions) and added test
Comment 20896
Date: 2015-05-28 16:44:53 +0200
From: Martin van Dinther <<martin.van.dinther>>
Reopened because when I extend the SELECT query with "abs(b-c)" as in:
SELECT abs(b-c), CASE WHEN c>(SELECT avg(c) FROM t1) THEN a2 ELSE b10 END FROM t1;
or
SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a2 ELSE b10 END, abs(b-c) FROM t1;
I again get the assertion failure:
mserver5: ../../../../MonetDB-11.19.11/sql/backends/monet5/rel_bin.c:2279: rel2bin_project: Assertion `0' failed.
This happens on MonetDB 5 server v11.19.11 "Oct2014-SP3" and on MonetDB 5 server v11.20.0. (built on 28 may 2015).
On MonetDB 5 server v11.20.0 I get:
mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2352: rel2bin_project: Assertion `0' failed.
I have extended BugTracker-2015/Tests/case_aggr.Bug-3705.sql and stable.out with the new SELECT statements and desired output.
Date: 2015-04-16 14:26:39 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.19.9 (Oct2014-SP2)
CC: @njnes
Last updated: 2015-06-22 22:32:24 +0200
Comment 20802
Date: 2015-04-16 14:26:39 +0200
From: Martin van Dinther <<martin.van.dinther>>
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Build Identifier:
SQL Query:
SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a2 ELSE b10 END FROM t1;
causes assertion failure
Reproducible: Always
Steps to Reproduce:
CREATE TABLE t1(a INTEGER, b INTEGER, c INTEGER, d INTEGER, e INTEGER);
INSERT INTO t1(e,c,b,d,a) VALUES(103,102,100,101,104);
SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a2 ELSE b10 END FROM t1;
Actual Results:
builtin opt gdk_dbpath = /export/scratch1/dinther/Downloads/INSTALL/var/monetdb5/dbfarm/demo
builtin opt gdk_debug = 0
builtin opt gdk_vmtrim = no
builtin opt monet_prompt = >
builtin opt monet_daemon = no
builtin opt mapi_port = 50000
builtin opt mapi_open = false
builtin opt mapi_autosense = false
builtin opt sql_optimizer = default_pipe
builtin opt sql_debug = 0
cmdline opt gdk_debug = 10
MonetDB 5 server v11.19.9 "Oct2014-SP2"
Serving database 'demo', using 8 threads
Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
Found 15.590 GiB available main-memory.
Copyright (c) 1993-July 2008 CWI.
Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
MonetDB/GIS module loaded
MonetDB/SQL module loaded
Welcome to mclient, the MonetDB/SQL interactive terminal (unreleased)
Database: MonetDB v11.19.9 (Oct2014-SP2), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>CREATE TABLE t1(a INTEGER, b INTEGER, c INTEGER, d INTEGER, e INTEGER);
operation successful (7.575ms)
sql>INSERT INTO t1(e,c,b,d,a) VALUES(103,102,100,101,104);
1 affected row (1.117ms)
sql>SELECT avg(c) FROM t1;
+--------------------------+
| L1 |
+==========================+
| 102 |
+--------------------------+
1 tuple (1.247ms)
sql>SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a2 ELSE b10 END FROM t1;
sql>
bash-4.2$
Expected Results:
no assertion failure
Also happens on MonetDB 5 server v11.20.0:
mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2234: rel2bin_project: Assertion `0' failed.
Comment 20814
Date: 2015-04-19 13:27:22 +0200
From: MonetDB Mercurial Repository <>
Changeset 33ac46bb0409 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=33ac46bb0409
Changeset description:
Comment 20818
Date: 2015-04-19 21:29:05 +0200
From: @njnes
Fixed (properly pass all projection expressions) and added test
Comment 20896
Date: 2015-05-28 16:44:53 +0200
From: Martin van Dinther <<martin.van.dinther>>
Reopened because when I extend the SELECT query with "abs(b-c)" as in:
SELECT abs(b-c), CASE WHEN c>(SELECT avg(c) FROM t1) THEN a2 ELSE b10 END FROM t1;
or
SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a2 ELSE b10 END, abs(b-c) FROM t1;
I again get the assertion failure:
mserver5: ../../../../MonetDB-11.19.11/sql/backends/monet5/rel_bin.c:2279: rel2bin_project: Assertion `0' failed.
This happens on MonetDB 5 server v11.19.11 "Oct2014-SP3" and on MonetDB 5 server v11.20.0. (built on 28 may 2015).
On MonetDB 5 server v11.20.0 I get:
mserver5: ../../../../dev/sql/backends/monet5/rel_bin.c:2352: rel2bin_project: Assertion `0' failed.
I have extended BugTracker-2015/Tests/case_aggr.Bug-3705.sql and stable.out with the new SELECT statements and desired output.
Comment 20897
Date: 2015-05-28 16:47:45 +0200
From: MonetDB Mercurial Repository <>
Changeset e946d6eed01a 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=e946d6eed01a
Changeset description:
The text was updated successfully, but these errors were encountered: