IBM Support

IC69493: INSENSITIVE CURSOR DOES NOT RETURN ITS RESULT SET AFTER A TRUNCATE TABLE

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Insensitive cursors are meant to have all result sets computed
    at cursor open time and thus be insensitive to any changes to
    the content of the table after the opening of the cursor.
    
    
    Note that the Sybase skin implicitly uses INSENSITIVE cursors
    when the cursor is specified as 'with return'
    
    However this is not the case when the operation after the open
    of the cursor is a TRUNCATE.   Consider the following example:
    
    create global temporary table x.t1 (x int)
    insert into x.t1 values 1,2,3
    
    create procedure p1 ()
    begin
     declare c1 insensitive cursor with hold with return to client
          for select x from x.t1;
     open c1;
     commit work;
     truncate table x.t1;
    end
    
    
    call p1 ()
    
    
    In this case rather than return the rows, the call p1() will
    return a -910 sqlcode when attempting to fetch from the result
    set.
    

Local fix

  • Use a delete from table rather than a truncate
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * use of INSENSITIVE cursors and truncate table                *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * result set for cursor not returned                           *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * upgrade to v97fp3                                            *
    ****************************************************************
    

Problem conclusion

  • Fixed in v97fp3
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC69493

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-06-28

  • Closed date

    2011-12-19

  • Last modified date

    2011-12-19

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IC69647

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC69493

Modified date: 19 December 2011