SELECT statement throws str_cast exception #2847
Last updated: 2011-09-16 15:04:35 +0200
Date: 2011-07-29 17:17:58 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
SELECT statement throws str_cast exception "too long for type (var)char(12)" but there are only CLOB or BIGINT attributes involved in the table definition and the query.
Steps to Reproduce:
sql>CREATE SCHEMA "testschema";
Date: 2011-07-29 17:47:54 +0200
I can reproduce this.
Date: 2011-07-29 18:10:34 +0200
Problem here is that the literal in the query (here: 'greet_person' is used as reference for the string length, and then casting the (longer) value from table ('greet__person') to that shorter length fails.
In fact, I wonder why that cast is required at all to compare two strings ...
Probably there is a good reason that I just don't see, yet; however, there should not be on overflow exception; rather when the string from the table is longer than the string literal, the equality comparison is known to yield false ...
Date: 2011-07-29 18:18:51 +0200
Try this sequence:
CREATE SCHEMA "testschema";
Date: 2011-08-01 17:28:42 +0200
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=0db7113f62eb
Date: 2011-08-01 17:33:00 +0200
It's a SQL bug.
Date: 2011-08-03 18:42:13 +0200
fixed. The supertype function now properly returns teh super type of 2
Date: 2011-09-16 15:04:35 +0200
The Aug2011 version has been released.
The text was updated successfully, but these errors were encountered: