You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Hans Zeller (JIRA)" <ji...@apache.org> on 2017/09/21 22:31:00 UTC
[jira] [Commented] (TRAFODION-2719) Trafci insert with parameters
can insert a string which length is larger than the column's length.
[ https://issues.apache.org/jira/browse/TRAFODION-2719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16175577#comment-16175577 ]
Hans Zeller commented on TRAFODION-2719:
----------------------------------------
To reproduce, run this in trafci, as the title says. sqlci does a "describe input" and during that operation we do the check and generate a warning.
After the fix, we get an error, as ISO/ANSI SQL specifies
{code}
SQL>prepare s from insert into c30 values (?);
--- SQL command prepared.
SQL>execute s using '09573c16-4dc1-4ba8-bc68-26adb1db7998';
*** ERROR[8402] A string overflow occurred during the evaluation of a character expression. [2017-09-21 22:26:00]
SQL>
{code}
I'll add a CQD to turn this behavior off, to give application writers some time to adapt to the new behavior:
{code}
cqd SUPPRESS_CHAR_LIMIT_CHECK 'on';
{code}
> Trafci insert with parameters can insert a string which length is larger than the column's length.
> ---------------------------------------------------------------------------------------------------
>
> Key: TRAFODION-2719
> URL: https://issues.apache.org/jira/browse/TRAFODION-2719
> Project: Apache Trafodion
> Issue Type: Bug
> Affects Versions: 2.1-incubating
> Reporter: Yang, Yongfeng
> Assignee: Hans Zeller
> Fix For: 2.3-incubating
>
>
> step to reproduce:
> create table c30(id char(30 chars) character set utf8 not null primary key);
> prepare s from insert into c30 values (?);
> execute s using '09573c16-4dc1-4ba8-bc68-26adb1db7998';
> -- case #3 in the table below, no warning, error, or truncation!
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)