Uploaded image for project: 'Apache Trafodion'
  1. Apache Trafodion
  2. TRAFODION-1241

LP Bug: 1456304 - mtserver - spjs with resultsets failing - no results returned

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: client-jdbc-t2
    • Labels:
      None

      Description

      SPJ tests with result sets failed because there are no result sets returned from the procedure. the same SPJ works from sqlci, but fails from trafci.

      Steps:
      ---------
      SQL>create table t1 (a int not null primary key, b varchar(20));
      SQL>insert into t1 values(111, 'aaaaa');
      SQL>insert into t1 values(222, 'bbbbb');
      SQL>create library testrs file '/opt/home/trafodion/SPJ/testrs.jar';
      SQL>create procedure RS200()
      language java
      parameter style java
      external name 'Testrs.RS200'
      dynamic result sets 1
      library testrs;
      SQL>call rs200();
      — SQL operation complete.
      ---------

      The expected result is:

      SQL >call rs200();
      A B
      ----------- --------------------
      111 aaaaa
      222 bbbbb
      — 2 row(s) selected.
      — SQL operation complete.

      The jar file, testrs.jar, is on amber7 under /opt/home/trafodion/SPJ. It has the SPJ procedure:

      public static void RS200(ResultSet[] paramArrayOfResultSet)
      throws Exception

      { String str1 = "jdbc:default:connection"; String str2 = "select * from t1"; Connection localConnection = DriverManager.getConnection(str1); Statement localStatement = localConnection.createStatement(); paramArrayOfResultSet[0] = localStatement.executeQuery(str2); }

        Attachments

          Activity

            People

            • Assignee:
              hegdean Anuradha Hegde
              Reporter:
              saruna Aruna Sadashiva
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: