JR43047: DELETE/UPDATE WITH WHERE CURRENT OF CURSOR CLAUSE COULD OPERATE ON THE INCORRECT RECORD

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • DELETE/UPDATE with WHERE CURRENT OF CURSOR clause could
    delete/update the wrong record. E.g.
    
    DECLARE cs1 CURSOR FOR SELECT col1 FROM nick1 WHERE col2 =
    'ABC'  AND NOT EXISTS (SELECT 1 FROM nick2 WHERE nick1.col3 =
    nick2.col3) FOR UPDATE
    OPEN cs1
    FETCH cs1
    DELETE FROM nick1 WHERE CURRENT OF cs1
    
    The DELETE could end up delete the wrong record in nick1.
    

Local fix

  • Tuning the query to use query plan without sort or temp
    operation on ship.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * The users is executing statment like "DELETE FROM... WHERE   *
    * CURRENT OF CURSOR" whose query plan has a SORT on the SHIP.  *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to InfoSphere Federation Server v97fp7 or later.     *
    ****************************************************************
    

Problem conclusion

  • The problem is first fixed at v97fp7.  After the fix, Federation
    Server will raise -508 error when "DELETE FROM... WHERE CURRENT
    OF CURSOR" is issued against a cursor whose query plan has a
    SORT on the SHIP. This fix can avoid unexpected wrong
    delete/update with MERGE JOIN plans, can also avoid the confuse
    of message SQL0100W.
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR43047

  • Reported component name

    FEDERATED COMPI

  • Reported component ID

    5724N9702

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-06-06

  • Closed date

    2012-10-24

  • Last modified date

    2012-10-24

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

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

    JR43048 JR43118

Fix information

  • Fixed component name

    FEDERATED COMPI

  • Fixed component ID

    5724N9702

Applicable component levels

  • R970 PSY

       UP



Rate this page:

(0 users)Average rating

Document information


More support for:

InfoSphere Federation Server
Compiler

Software version:

9.7

Reference #:

JR43047

Modified date:

2012-10-24

Translate my page

Machine Translation

Content navigation