IBM Support

IC96922: 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:                                              *
    * Update to 10.5.0.3                                           *
    ****************************************************************
    

Problem conclusion

  • Problem Fixed In 10.5.0.3
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC96922

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    A50

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-10-15

  • Closed date

    2014-02-28

  • Last modified date

    2015-04-07

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

    IC91418

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

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RA10 PSN

       UP

  • RA50 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.5","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
13 January 2022