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

assertion fails upon execution of a valid SQL query #3085

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

assertion fails upon execution of a valid SQL query #3085

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


Copy link

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

Date: 2012-05-23 18:48:16 +0200
From: Babis <>
To: SQL devs <>
Version: -- development
CC: @njnes, @drstmane

Last updated: 2012-06-19 11:20:20 +0200

Comment 17277

Date: 2012-05-23 18:48:16 +0200
From: Babis <>

User-Agent: Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.9.168 Version/11.52
Build Identifier: Jul2012

mclient terminates its connection to mserver5 when executing a valid SQL query such as the above:

SELECT 1, (SELECT count(*) FROM R);

Notice that a query similar to the above that swaps the projected attributes executes correctly:

SELECT (SELECT count(*) FROM R), 1;

Reproducible: Always

Steps to Reproduce:

  2. SELECT (SELECT count(*) FROM R), 1; it works fine
  3. SELECT 1, (SELECT count(*) FROM R); it doesn't work

Actual Results:

sql>SELECT 1, (SELECT count() FROM R);
MAPI = (monetdb) /tmp/.s.monetdb.50000
ACTION= read_line
) FROM R);
ERROR = !Connection terminated

Comment 17278

Date: 2012-05-23 18:57:57 +0200
From: @drstmane

most probabaly this is actually a crash (segfault) of the server,
please check and share server console output or monetdbd (merovignian) log.

Comment 17279

Date: 2012-05-23 19:06:47 +0200
From: Babis <>

Oops, sorry, I forgot to include it:

ERR db[24300]: mserver5: ../../../MonetDB/sql/server/rel_select.c:616: rel_project: Assertion `exps_card(rel->exps) <= rel->card' failed.
MSG merovingian[9336]: database 'db' (24300) was killed by signal SIGABRT

Comment 17280

Date: 2012-05-23 20:01:36 +0200
From: @drstmane

It indeed fails with Apr2012 with assertions enabled,
but appears to work fine with assertions disabled.

We'll need to check the validity of the asssertion ...

Comment 17291

Date: 2012-05-25 21:51:53 +0200
From: @njnes

Changeset 4acfcc5693ca made by Niels Nes in the MonetDB repo, refers to this bug.

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

Changeset description:

fixed bug #3085, ie properly keep cardinality of projection/groupby

Comment 17292

Date: 2012-05-25 21:53:49 +0200
From: @njnes

Fixed on the april2012 branch. The assertion doesn't appear anymore as the project/groupby now properly keep the cardinality (ie starting low (atom/aggr) and increased on multi row/columns)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant