Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-1225

LP Bug: 1451707 - Call ResultSet.next() function failed when expect to select 200k utf8 column size from a table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 2.0-incubating
    • client-jdbc-t2
    • None

    Description

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

      Attachments

        Activity

          People

            weiqxu Weiqing Xu
            yubo YuBo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: