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

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

GitHub user mashengchen opened a pull request:

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

    [TRAFODION-2684] tinyint boundary issue

    

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

    $ git pull https://github.com/mashengchen/incubator-trafodion 
jdbc_tinyint_boundary

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

    https://github.com/apache/incubator-trafodion/pull/1181.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 #1181
    
----
commit f816b97e311998e00f11ad61c790a6b4270dba92
Author: mashengchen <[email protected]>
Date:   2017-07-14T09:18:14Z

    fix tinyint boundary issue

----


> getString from tinyint unsiged(255) column, throw exception: Numerica out of 
> range
> ----------------------------------------------------------------------------------
>
>                 Key: TRAFODION-2684
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2684
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: client-jdbc-t4
>    Affects Versions: 2.1-incubating
>         Environment: centos:6.7,
>            Reporter: luoyunpeng
>
> when i was using getString method on tinyint unsigned(255) column, throwed 
> exception:
> {color:red}Numerica out of range {color}.
> test code as following:
> ####
> public void testGetString() throws SQLException {
>               String tableName = "testGetString";
>               try {
>                       Statement stmt = conn.createStatement();
>                       stmt.executeUpdate("cqd traf_tinyint_return_values 
> 'ON'");
>                       stmt.executeUpdate("cqd traf_tinyint_input_params 
> 'ON'");
>                       stmt.executeUpdate("create table " + tableName + " (id 
> int not null,age tinyint unsigned,primary key(id))");
>                       stmt.executeUpdate("insert into " + tableName + " 
> values(1,255)");
>                       ResultSet rs = stmt.executeQuery("select * from " + 
> tableName);
>                       rs.next();
>                       System.out.println(rs.getString(2));
>               } finally {
>                       dropTable(tableName);
>               }
>       }
> ####



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

Reply via email to