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/10/03 17:14: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=16189990#comment-16189990 ] 

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

GitHub user zellerh opened a pull request:

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

    [TRAFODION-2719] Check for truncation and four more fixes

    This pull request combines five fixes, each in its own commit.
    
    **[TRAFODION-2719] Check for truncation of character columns**
    
    When inserting into a UTF-8 character column with a fixed number
    of characters, do a check whether the source string contains no
    more than the allowed number of characters (just checking the
    byte length is not enough). This bug does not show when using
    sqlci, since sqlci does its own check before calling the
    executor. It only happens when using JDBC or trafci.
    
    - core/sql/cli/CliExpExchange.cpp
    - core/sql/exp/exp_expr.h
    - core/sql/generator/GenExpGenerator.cpp
    - core/sql/sqlcomp/DefaultConstants.h
    - core/sql/sqlcomp/nadefaults.cpp
    
    
    **[TRAFODION-2736] Missing predicates on salt columns**
    
    In some cases, when we generate an index join (join of
    an alternate index with the clustering index), we lost
    the generated predicates on computed columns such as
    salt and division. 
    
    - core/sql/optimizer/RelScan.h
    - partial: core/sql/optimizer/TransRule.cpp
    
    
    **[TRAFODION-2751] Unnecessary PROBE_CACHE in an index join**
    
    An index join produces unique matches from the index, so
    a probe cache would be a waste of resources. Added a check
    to suppress probe cache for index joins.
    
    - core/sql/optimizer/OptLogRelExpr.cpp
    - partial: core/sql/optimizer/TransRule.cpp
    - core/sql/regress/core/EXPECTED005.SB
    
    **[TRAFODION-2752] Fix error message when UDR method not found**
    
    The error message displayed only the signature, but not the
    method name.
    
    - core/sql/regress/udr/EXPECTED100.SB
    - core/sql/regress/udr/TEST100
    - core/sql/sqlcomp/CmpSeabaseDDLroutine.cpp
    
    
    **[TRAFODION-2761] Error when all TMUDF columns are eliminated**
    
    Fix a couple of places where we would core dump when all
    columns of the input table of a TMUDF were eliminated. Also
    removed an unused NAColumnArray method that has a bug.
    
    - core/sql/executor/ExUdr.cpp
    - core/sql/generator/GenUdr.cpp
    - core/sql/optimizer/NAColumn.cpp
    - core/sql/optimizer/NAColumn.h
    - core/sql/regress/udr/EXPECTED001
    - core/sql/regress/udr/TEST001
    - core/sql/regress/udr/TEST001_Sessionize.java
    
    
    **Other fixes:**
    
    Change the swjdbc script to pick up the Trafodion version from
    the current environment, not when we run install_traf_components.
    
    - core/sqf/sql/scripts/install_traf_components


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

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

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

    https://github.com/apache/incubator-trafodion/pull/1254.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 #1254
    
----
commit 279a9fd983bbd27eeacd5e084e1bf6b339cdd7ef
Author: Hans Zeller <hz...@apache.org>
Date:   2017-10-03T17:00:50Z

    [TRAFODION-2719] Check for truncation of character columns
    
    When inserting into a UTF-8 character column with a fixed number
    of characters, do a check whether the source string contains no
    more than the allowed number of characters (just checking the
    byte length is not enough). This bug does not show when using
    sqlci, since sqlci does its own check before calling the
    executor. It only happens when using JDBC or trafci.

commit 4327078e805617293c7a7ae028763b0949f6ec9f
Author: Hans Zeller <hz...@apache.org>
Date:   2017-10-03T17:02:04Z

    [TRAFODION-2736] Missing predicates on salt columns
    
    In some cases, when we generate an index join (join of
    an alternate index with the clustering index), we lost
    the generated predicates on computed columns such as
    salt and division.

commit 839f222356ed482215d876414761b4f1fcd54e59
Author: Hans Zeller <hz...@apache.org>
Date:   2017-10-03T17:02:52Z

    [TRAFODION-2751] Unnecessary PROBE_CACHE in an index join
    
    An index join produces unique matches from the index, so
    a probe cache would be a waste of resources. Added a check
    to suppress probe cache for index joins.

commit 4b1c64c892e68cfbecd1f87bc7ddc5327c52723c
Author: Hans Zeller <hz...@apache.org>
Date:   2017-10-03T17:03:40Z

    [TRAFODION-2752] Fix error message when UDR method not found
    
    The error message displayed only the signature, but not the
    method name.

commit 4e7ad3aa967a60d4a212074e962f0f22a811eaf0
Author: Hans Zeller <hz...@apache.org>
Date:   2017-10-03T17:04:12Z

    [TRAFODION-2761] Error when all TMUDF columns are eliminated
    
    Fix a couple of places where we would core dump when all
    columns of the input table of a TMUDF were eliminated. Also
    removed an unused NAColumnArray method that has a bug.

commit cd8c3a90df1e86f33bc783be212b2b11d1600170
Author: Hans Zeller <hz...@apache.org>
Date:   2017-10-03T17:04:40Z

    Change the swjdbc script to pick up the Trafodion version from
    the current environment, not when we run install_traf_components.

----


> 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)