You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mamta A. Satoor (Updated) (JIRA)" <ji...@apache.org> on 2012/02/24 02:27:48 UTC

[jira] [Updated] (DERBY-5537) Casting to a shorter string type does not warn about truncation

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

Mamta A. Satoor updated DERBY-5537:
-----------------------------------

    Issue & fix info: Release Note Needed,Repro attached
             Urgency: Normal
              Labels: derby_triage10_9  (was: )
    
> Casting to a shorter string type does not warn about truncation
> ---------------------------------------------------------------
>
>                 Key: DERBY-5537
>                 URL: https://issues.apache.org/jira/browse/DERBY-5537
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.8.2.2
>            Reporter: Knut Anders Hatlen
>              Labels: derby_triage10_9
>         Attachments: warn.diff
>
>
> SQL:2003, part 2, 6.12 <cast specification> specifies that a truncation warning should be raised when casting from one (character or binary) string data type to another. Derby does truncate, but it doesn't raise a warning:
> ij> values cast('abc' as char(2));
> 1 
> --
> ab
> 1 row selected
> ij> values cast(x'cafebabe' as char(2) for bit data);
> 1   
> ----
> cafe
> 1 row selected
> We should generate a warning in order to be compliant.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira