IBM Support

IC91418: USER-DEFINED FUNCTION WITH INDEX EXTENSION EXPLOITATION MIGHT RETURN INCORRECT RESULTS IF INDEX IS NOT PRESENT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following is an example of a UDF which might return
    incorrect results:
    CREATE FUNCTION PSearch (a pair, b pair)
       RETURNS Integer
       LANGUAGE SQL
       DETERMINISTIC
       NO EXTERNAL ACTION
       PREDICATES
    (
         WHEN = 1
           SEARCH BY EXACT INDEX EXTENSION PairExt
             WHEN KEY (a) USE  RetrieveKey (b)
             WHEN KEY (b) USE  RetrieveKey (a)
    )
       RETURN (0)
    
    The following is a query using the UDF as a predicate:
    SELECT * FROM mytable AS a
    WHERE PSearch(a.column, 1) = 1
    
    If the index does not exist, the SEARCH BY expression is not
    processed and the function PSearch returns the value 0 which
    results in no rows being returned.  Due to the error in function
    processing, all table rows might be returned.
    

Local fix

  • Ensure that the index exists if the function is intended to be
    used with a table that has a defined index extension.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 Version 10.1 Fix Pack 3                       *
    ****************************************************************
    

Problem conclusion

  • Upgrade to DB2 Version 10.1 Fix Pack 3
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC91418

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-04-08

  • Closed date

    2013-09-27

  • Last modified date

    2013-09-27

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

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

    IC96922

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RA10 PSN

       UP

  • RA10 PSY

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
27 September 2013