SPJ w result set failed with ERROR[8413]

Bug #1355034 reported by Chong Hsu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
In Progress
High
Pavani Puppala

Bug Description

Tested with Trafodion build, 20140801-0830.

Calling a SPJ with result set:

   public static void NS786(String paramString, ResultSet[] paramArrayOfResultSet)
     throws Exception
   {
     String str1 = "jdbc:default:connection";

     Connection localConnection = DriverManager.getConnection(str1);
     String str2 = "select * from " + paramString;
     Statement localStatement = localConnection.createStatement();
     paramArrayOfResultSet[0] = localStatement.executeQuery(str2);
   }

it failed with ERROR[8413]:

*** ERROR[8413] The string argument contains characters that cannot be converted. [2014-08-11 04:06:32]
*** ERROR[8402] A string overflow occurred during the evaluation of a character expression. Conversion of Source Type:LARGEINT(REC_BIN64_SIGNED) Source Value:79341348341248 to Target Type:CHAR(REC_BYTE_F_ASCII). [2014-08-11 04:06:32]

The SPJ Jar file is attached. Here are the steps to produce the error:

set schema testspj;

create library spjrs file '/<Jar location>/Testrs.jar';

create procedure RS786(varchar(100))
       language java
       parameter style java
       external name 'Testrs.NS786'
       dynamic result sets 1
       library spjrs;

create table datetime_interval (
        date_key date not null,
        date_col date default date '0001-01-01',
        time_col time default time '00:00:00',
        timestamp_col timestamp
                                 default timestamp '0001-01-01:00:00:00.000000',
        interval_year interval year default interval '00' year,
        yr2_to_mo interval year to month
                                 default interval '00-00' year to month,
        yr6_to_mo interval year(6) to month
                                 default interval '000000-00' year(6) to month,
        yr16_to_mo interval year(16) to month default
                              interval '0000000000000000-00' year(16) to month,
        year18 interval year(18) default
                                 interval '000000000000000000' year(18),
        day2 interval day default interval '00' day,
        day18 interval day(18)
                                 default interval '000000000000000000' day(18),
        day16_to_hr interval day(16) to hour
                        default interval '0000000000000000:00' day(16) to hour,
        day14_to_min interval day(14) to minute default
                              interval '00000000000000:00:00' day(14) to minute,
        day5_to_second6 interval day(5) to second(6) default
                         interval '00000:00:00:00.000000' day(5) to second(6),

        hour2 interval hour default interval '00' hour,
        hour18 interval hour(18)
                                 default interval '000000000000000000' hour(18),
        hour16_to_min interval hour(16) to minute default
                          interval '0000000000000000:00' hour(16) to minute,
        hour14_to_ss0 interval hour(14) to second(0) default
                          interval '00000000000000:00:00' hour(14) to second(0),
        hour10_to_second4 interval hour(10) to second(4) default
                         interval '0000000000:00:00.0000' hour(10) to second(4),
        min2 interval minute default interval '00' minute,
        min18 interval minute(18) default
                                 interval '000000000000000000' minute(18),
        min13_s3 interval minute(13) to second(3) default
                        interval '0000000000000:00.000' minute(13) to second(3),
        min16_s0 interval minute(16) to second(0) default
                        interval '0000000000000000:00' minute(16) to second(0),
        seconds interval second default interval '00' second,
        seconds5 interval second(5) default interval '00000' second(5),
        seconds18 interval second(18,0) default
                                 interval '000000000000000000' second(18,0),
        seconds15 interval second(15,3) default
                                 interval '000000000000000.000' second(15,3),
        primary key (date_key)
      ) ;

insert into datetime_interval
           (date_key, date_col, time_col, timestamp_col,
     interval_year, yr2_to_mo, yr6_to_mo, yr16_to_mo, year18)
          values
    (date '0011-12-30', date '1239-01-01', time '01:01:01',
            timestamp '0091-10-10 10:10:10.111111', - interval '11' year,
     interval '11-11' year to month,
            interval '111111-11' year(6) to month,
            interval '1111111111111111-11' year(16) to month,
            interval '111111111111111111' year(18));

Call RS786('datetime_interval');

*** ERROR[8413] The string argument contains characters that cannot be converted. [2014-08-11 04:06:32]
*** ERROR[8402] A string overflow occurred during the evaluation of a character expression. Conversion of Source Type:LARGEINT(REC_BIN64_SIGNED) Source Value:79341348341248 to Target Type:CHAR(REC_BYTE_F_ASCII). [2014-08-11 04:06:32]

Tags: sql-exe
Revision history for this message
Chong Hsu (chong-hsu) wrote :
Changed in trafodion:
assignee: nobody → Pavani Puppala (pavani-puppala)
Chong Hsu (chong-hsu)
Changed in trafodion:
milestone: none → r1.0
Changed in trafodion:
milestone: r1.0 → r1.1
Chong Hsu (chong-hsu)
Changed in trafodion:
milestone: r1.1 → r2.0
importance: Medium → High
Changed in trafodion:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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