You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:20:28 UTC
[jira] [Created] (TRAFODION-1225) LP Bug: 1451707 - Call
ResultSet.next() function failed when expect to select 200k utf8 column
size from a table
Alice Chen created TRAFODION-1225:
-------------------------------------
Summary: LP Bug: 1451707 - Call ResultSet.next() function failed when expect to select 200k utf8 column size from a table
Key: TRAFODION-1225
URL: https://issues.apache.org/jira/browse/TRAFODION-1225
Project: Apache Trafodion
Issue Type: Bug
Components: client-jdbc-t2
Reporter: YuBo
Assignee: Weiqing Xu
Priority: Critical
Fix For: 2.0-incubating
Defect Description:
There is a table that columns charset as utf8, when expect to return 200K column size, it is failed to call ResultSet.next() function.
Test Environment:
sqws139.houston.hp.com, T2 driver.
Test Steps:
Step 1. Create a table as below,
sql = "create table tblcolumnsize200kWithUTF8(c1 char(50000) character set UTF8 collate default null, c2 char(50000) character set UTF8 collate default null)";
iRet = stmt.executeUpdate(sql);
Step 2. Insert 20K utf8 column size into the above table.
Step 3. Execute query as below,
sql = "select left(rtrim(t.c1), 50000) as o1 from tblcolumnsize200kWithUTF8 as t";
rs = stmt.executeQuery(sql);
Step 4. Compare the first column o1 size returned from ResultSet object.
rs.next();
assertEquals(50000, (URLDecoder.decode(rs.getObject(1).toString(), "UTF-8")).length());
At the Step 4, it will throw an exception as below,
java.lang.NegativeArrayizeException
at org.trafodion.jdbc.t2.SQLMXResultSet.fetchN(Native Method)
at org.trafodion.jdbc.t2.SQLMXResultSet.next(SQLMXResultSet.java:2478)
...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)