You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/04/05 18:25:41 UTC

[jira] [Commented] (TRAFODION-2576) Incremental UPDATE STATS fails on long varchar values

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

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

GitHub user DaveBirdsall opened a pull request:

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

    [TRAFODION-2576] Fix long varchar bug in incremental UPDATE STATISTICS

    

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

    $ git pull https://github.com/DaveBirdsall/incubator-trafodion Trafodion2376

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

    https://github.com/apache/incubator-trafodion/pull/1046.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 #1046
    
----
commit ebf98de2ba8ffd361773df3e42b8813b98ce6691
Author: Dave Birdsall <db...@apache.org>
Date:   2017-04-05T18:23:38Z

    [TRAFODION-2576] Fix long varchar bug in incremental UPDATE STATISTICS

----


> Incremental UPDATE STATS fails on long varchar values
> -----------------------------------------------------
>
>                 Key: TRAFODION-2576
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2576
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>         Environment: All
>            Reporter: David Wayne Birdsall
>            Assignee: David Wayne Birdsall
>
> The following test script demonstrates the problem:
> -- This script creates a table with varchar values longer than 256 characters.
> -- It tnen demonstrates issues with incremental stats on such values.
> ?section setup
> drop table if exists testbigcol;
> create table testbigcol
>   ( a int not null,
>     b varchar(500),
>     primary key (a) )
> salt using 4 partitions;
> insert into testbigcol values (1,'axq'),(2,'bxw');
> insert into testbigcol select x.a + 2 * y.a, x.b || y.b from testbigcol x cross join testbigcol y;
> insert into testbigcol select x.a + 6 * y.a, x.b || y.b from testbigcol x cross join testbigcol y;
> insert into testbigcol select x.a + 42 * y.a, x.b || y.b from testbigcol x cross join testbigcol y;
> --                              0         1         2         3         4         5
> --                              012345678901234567890123456789012345678901234567890123
> update testbigcol set b = b || ' and now for something completely different 0123456789'
>   where mod(a,2) = 1;
> update testbigcol set b = b || ' that was fun, and now for something completely different 0123456789'
>   where mod(a,3) = 1;
> update testbigcol set b = b || ' and then there was a great hue and cry and now for something completely different 0123456789'
>   where mod(a,5) = 1;
> update testbigcol set b = b || ' and we can do all sorts of things to make these strings longer, and now for something completely different 0123456789'
>   where mod(a,7) = 1;
> ?section testit
> update statistics for table testbigcol on every column sample random 100 percent persistent;
> showstats for table testbigcol on existing columns detail;
> update testbigcol set b = 'c' || b where a > 1700;
> update statistics for table testbigcol on existing columns incremental where a > 1700;
> showstats for table testbigcol on existing columns detail;
> When run, the last UPDATE STATISTICS command fails as follows:
> >>update statistics for table testbigcol on existing columns incremental where a > 1700;
> *** ERROR[9200] UPDATE STATISTICS for table TRAFODION.SEABASE.TESTBIGCOL encountered an error (8402) from statement IUS data set I creation.
> *** ERROR[8402] A string overflow occurred during the evaluation of a character expression. Conversion of Source Type:VARCHAR(REC_BYTE_V_ASCII,290 BYTES,ISO88591) Source Value:caxqbxwbxwaxqaxqbxwbxwbxw and now for something completely different 0123456789 and then there was a great hue and cry and now for something completely different 0123456789 and we can do all sorts of to Target Type:VARCHAR(REC_BYTE_V_ASCII,256 BYTES,ISO88591).
> --- SQL operation failed with errors.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)