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

CASE query crashes database #6190

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

CASE query crashes database #6190

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-01-19 15:48:52 +0100
From: @rkoopmanschap
To: SQL devs <>
Version: 11.23.13 (Jun2016-SP2)

Last updated: 2017-03-03 10:24:25 +0100

Comment 24896

Date: 2017-01-19 15:48:52 +0100
From: @rkoopmanschap

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
Build Identifier:

The query using CASE below sometimes crashes the database. This seems to happen the majority of the times it is done, although sometimes it does produce the correct results. Rarely, some variations of these commands give the following error instead of crashing or printing output:

values of bat not unique, cannot set key property

Reproducible: Sometimes

Steps to Reproduce:

Run the following commands in a mclient session:

CREATE TABLE test_table (foo varchar(250));

INSERT INTO test_table VALUES ('foo1');
INSERT INTO test_table VALUES ('foo4');
INSERT INTO test_table VALUES ('foo2');

SELECT CASE WHEN foo = 'foo1' THEN 1 WHEN foo = 'foo2' THEN 2 END AS result_name FROM test_table GROUP BY result_name;

You may have to run the SELECT query multiple times.

Actual Results:

The database crashes.

Expected Results:

+-------------+
| result_name |
+=============+
| 1 |
| null |
| 2 |
+-------------+

Comment 24898

Date: 2017-01-19 16:18:45 +0100
From: MonetDB Mercurial Repository <>

Changeset d16296e81d5a made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

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

Changeset description:

Allocate enough memory.
This should fix bug #6190.

Comment 25116

Date: 2017-03-03 10:24:25 +0100
From: @sjoerdmullender

Dec2016-SP2 has been released, incorporating the fix.

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