[ 
https://issues.apache.org/jira/browse/DERBY-4704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Knut Anders Hatlen updated DERBY-4704:
--------------------------------------

    Bug behavior facts: [Wrong query result]

Marking as "Wrong query result" since the client driver returns the wrong value 
for unknown (false instead of null) because of this. It also raises an error, 
but that's not until after it has returned the wrong value.

ij> SELECT X, CAST(X AS BOOLEAN) FROM T;
X         |2    
----------------
true      |true 
false     |false
unknown   |false
JAVA ERROR: java.lang.ArrayIndexOutOfBoundsException: 123

> Incorrect nullability when casting non-nullable VARCHAR to BOOLEAN
> ------------------------------------------------------------------
>
>                 Key: DERBY-4704
>                 URL: https://issues.apache.org/jira/browse/DERBY-4704
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.0.0
>            Reporter: Knut Anders Hatlen
>
> With the following table definition and query
> CREATE TABLE T (X VARCHAR(10) NOT NULL);
> INSERT INTO T VALUES 'true', 'false', 'unknown';
> SELECT CAST(X AS BOOLEAN) FROM T;
> the meta-data for the returned result will say that the column is not 
> nullable, although it will contain a NULL value in the third row.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to