You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "luoyunpeng (JIRA)" <ji...@apache.org> on 2017/07/12 02:22:00 UTC
[jira] [Created] (TRAFODION-2684) getString from tinyint
unsiged(255) column, throw exception: Numerica out of range
luoyunpeng created TRAFODION-2684:
-------------------------------------
Summary: 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)