T2 server return trunctated column size to T2 client

Bug #1451693 reported by Yu Bo
2
Affects Status Importance Assigned to Milestone
Trafodion
Fix Committed
High
Weiqing Xu

Bug Description

Defect Description:

There is a table that columns charset as iso88591, when expect to return 20K column size, in fact it returns the length as 3392.

Test Environment:

sqws139.houston.hp.com, T2 driver.

Test Steps:

Step 1. Create a table as below,

sql = "create table tblcolumnsize200kWithISO88591(c1 char(200000) character set iso88591 collate default null, c2 char(200000) character set iso88591 collate default null)";
iRet = stmt.executeUpdate(sql);

Step 2. Insert 20K column size into the above table.

Step 3. Execute query as below,

sql = "select left(rtrim(t.c1), 200000) as o1 from tblcolumnsize200kWithISO88591 as t";
rs = stmt.executeQuery(sql);

Step 4. Compare the first column o1 size returned from ResultSet object.

assertEquals(200000, rs.getObject(1).toString().length());

At the Step 4, it will throw an exception like 'Exception in thread "main" java.lang.AssertionError: expected: <200000> but was: <3392>'

Yu Bo (byu)
Changed in trafodion:
assignee: nobody → Yu Bo (byu)
assignee: Yu Bo (byu) → nobody
Changed in trafodion:
assignee: nobody → xiu-zhu.zhang (xiu-zhu-zhang)
Changed in trafodion:
importance: Undecided → High
Changed in trafodion:
milestone: none → r2.0
Changed in trafodion:
status: New → In Progress
Changed in trafodion:
status: In Progress → New
Changed in trafodion:
status: New → In Progress
Changed in trafodion:
assignee: xiu-zhu.zhang (xiu-zhu-zhang) → Weiqing Xu (wei-qing-xu)
Revision history for this message
Aruna Sadashiva (aruna-sadashiva) wrote :

Please try with multiple columns and also multiple rows.

These are the various tables qa tested with:

create table t1(c1 char(30000));
create table t2(c1 varchar(30000));
create table t3(c1 char(40000));
create table t4(c1 varchar(40000));
create table t5(c1 char(30000) not null);
create table t6(c1 varchar(30000) not null);
create table t7(c1 char(40000) not null);
create table t8(c1 varchar(40000)not null);
create table t9(c1 varchar(200000));
create table t10(c1 varchar(200000) not null);
create table t11(c1 char(40000), c2 varchar(40000));
create table t12(c1 char(40000) not null, c2 varchar(40000) not null);
create table t13(c1 char(200000), c2 varchar(200000));
create table t14(c1 char(200000) not null, c2 varchar(200000) not null);
create table t15(c1 char(200000) not null, c2 varchar(200000));
create table t16(c1 char(200000), c2 varchar(200000) not null);
create table t17(c1 char (30000), c2 varchar(30000));
create table t18(c1 char (30000) not null, c2 varchar(30000) not null);

The junit test file is attached.

Revision history for this message
Aruna Sadashiva (aruna-sadashiva) wrote :
Revision history for this message
Weiqing Xu (wei-qing-xu) wrote :

Here is the code review link: https://review.trafodion.org/#/c/1671/

Changed in trafodion:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.