[ 
https://issues.apache.org/jira/browse/TRAFODION-2669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16068649#comment-16068649
 ] 

ASF GitHub Bot commented on TRAFODION-2669:
-------------------------------------------

GitHub user zellerh opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/1156

    [TRAFODION-2669] Improve error message 8402 - string overflow

    Trying to give a better indication in some cases, to show
    whether we exceeded the character limit or the byte limit.
    The character limit is defined by a "precision" that is
    a positive number.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zellerh/incubator-trafodion bug/r2.2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/1156.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1156
    
----
commit 8c9c7c2ee5c3e76e7eb63806f3849db6f00a0da3
Author: Hans Zeller <[email protected]>
Date:   2017-06-29T17:15:38Z

    [TRAFODION-2669] Improve error message 8402 - string overflow
    
    Trying to give a better indication in some cases, to show
    whether we exceeded the character limit or the byte limit.
    The character limit is defined by a "precision" that is
    a positive number.

----


> Error message of 8402 cause misunderstanding
> --------------------------------------------
>
>                 Key: TRAFODION-2669
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2669
>             Project: Apache Trafodion
>          Issue Type: Improvement
>          Components: sql-general
>    Affects Versions: any
>            Reporter: Yuan Liu
>            Assignee: Hans Zeller
>             Fix For: any
>
>
> When inserting a value longer than the column data type, the error message 
> caused misunderstanding.
> Why 21 bytes can not be inserted into 24 bytes?
> SQL>showddl test_utf8;
> CREATE TABLE TRAFODION.SEABASE.TEST_UTF8
>   (
>     A                                VARCHAR(6 CHARS) CHARACTER SET UTF8
>       COLLATE DEFAULT DEFAULT NULL NOT SERIALIZED
>   )
>  ATTRIBUTES ALIGNED FORMAT
> ;
> --- SQL operation complete.
> SQL>insert into test_utf8 values('我我我我我我');
> --- 1 row(s) inserted.
> SQL>insert into test_utf8 values('我我我我我我我');
> *** ERROR[8402] A string overflow occurred during the evaluation of a 
> character expression. Conversion of Source 
> Type:VARCHAR(REC_BYTE_V_ASCII,{color:red}21 BYTES,UTF8{color}) Source 
> Value:我我我我我我我 to Target Type:VARCHAR(REC_BYTE_V_ASCII,{color:red}24 
> BYTES,UTF8{color}). [2017-06-27 15:44:45]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to