db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5749) VARCHAR args to stored methods are silently truncated if too long for the argument type.
Date Thu, 10 May 2012 11:21:51 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272252#comment-13272252

Dag H. Wanvik commented on DERBY-5749:

Thanks, Knut. Checking other implicit cast usage, I found this, which is probably also wrong
since it's definitely an assignment:

> s.executeUpdate("create table tt(c varchar(5) generated always as ('--' || b), b varchar(5))");
> s.executeUpdate("insert into tt values (default, '12345')");

No error is thrown here either.

> select * from tt;
C    |A    
> VARCHAR args to stored methods are silently truncated if too long for the argument type.
> ----------------------------------------------------------------------------------------
>                 Key: DERBY-5749
>                 URL: https://issues.apache.org/jira/browse/DERBY-5749
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, SQL
>    Affects Versions:,,,,,,,,,,,,,,,,,,,
>            Reporter: Dag H. Wanvik
>         Attachments: DERBY-5749.diff, DERBY-5749.stat, SilentVarcharArgTruncation.java,
> Cf the attached repro SilentVarcharArgTruncation.
> It seem implicit casts are inserted here, cf discussion on derby-dev thread starting
here: http://mail-archives.apache.org/mod_mbox/db-derby-dev/201205.mbox/%3Cx67gwm7hir.fsf%40oracle.com%3E

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


View raw message