Casting to a CLOB value does not truncate.
------------------------------------------

         Key: DERBY-786
         URL: http://issues.apache.org/jira/browse/DERBY-786
     Project: Derby
        Type: Bug
  Components: SQL  
    Versions: 10.1.2.1    
    Reporter: Daniel John Debrunner
 Assigned to: Daniel John Debrunner 
    Priority: Minor
     Fix For: 10.2.0.0


ij> values cast(cast ('123456' as varchar(5)) as varchar(10));
1
----------
12345

1 row selected
ij> values cast(cast ('123456' as clob(5)) as varchar(10));
1
----------
123456

I think caused by CLOB not returning true for TypeId.variableLength() not 
returning true for CLOB.
Comments in code indicate some confusion, will add comments indicating the 
method is for types where
the length is application defined. Will also remove XML as a variable type.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to