Date: 2016-02-25 09:56:44 +0100
From: Arno Mittelbach <<arno.mittelbach>>
To: SQL devs <>
Version: 11.21.13 (Jul2015-SP2)
Last updated: 2016-03-25 09:59:18 +0100
Comment 21821
Date: 2016-02-25 09:56:44 +0100
From: Arno Mittelbach <<arno.mittelbach>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Build Identifier:
For preparation consider the following simple table with one entry.
Create table a (a varchar(5), b varchar(10));
insert into a values ('12345','1234567890');
Now, the following statement outputs, as expected, 1234567890:
SELECT CASE WHEN 1=2 THEN a ELSE b END from a;
Result: 1234567890
However, when putting in a constant value then MonetDb returns an odd result:
SELECT CASE WHEN 1=2 THEN a ELSE 'lala' END from a;
Result: Px?~
The result is even varying if you run the query multiple times.
Reproducible: Always
Steps to Reproduce:
Create table a (a varchar(5), b varchar(10));
insert into a values ('12345','1234567890');
SELECT CASE WHEN 1=2 THEN a ELSE 'lala' END from a;
Actual Results:
Px?~
Expected Results:
'lala'
As CASE expressions are quite standard and this may lead to wrong results I've set the Severity to critical.
Date: 2016-02-25 09:56:44 +0100
From: Arno Mittelbach <<arno.mittelbach>>
To: SQL devs <>
Version: 11.21.13 (Jul2015-SP2)
Last updated: 2016-03-25 09:59:18 +0100
Comment 21821
Date: 2016-02-25 09:56:44 +0100
From: Arno Mittelbach <<arno.mittelbach>>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Build Identifier:
For preparation consider the following simple table with one entry.
Create table a (a varchar(5), b varchar(10));
insert into a values ('12345','1234567890');
Now, the following statement outputs, as expected, 1234567890:
SELECT CASE WHEN 1=2 THEN a ELSE b END from a;
Result: 1234567890
However, when putting in a constant value then MonetDb returns an odd result:
SELECT CASE WHEN 1=2 THEN a ELSE 'lala' END from a;
Result: Px?~
The result is even varying if you run the query multiple times.
Reproducible: Always
Steps to Reproduce:
Actual Results:
Px?~
Expected Results:
'lala'
As CASE expressions are quite standard and this may lead to wrong results I've set the Severity to critical.
Comment 21831
Date: 2016-02-26 15:47:19 +0100
From: MonetDB Mercurial Repository <>
Changeset 200c19adf549 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=200c19adf549
Changeset description:
Comment 21832
Date: 2016-02-26 15:47:37 +0100
From: @sjoerdmullender
Fixed.
Comment 21959
Date: 2016-03-25 09:59:18 +0100
From: @sjoerdmullender
Jul2015-SP3 has been released.
The text was updated successfully, but these errors were encountered: