PM85792: INCORROUT FOR LENGTH FUNCTION WHEN USING INDEX IN V10

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Please see example below, the query returns incorrect output
    when using the index. It can return correct ouput after the
    index is dropped.
    
    CREATE TABLE TESTTB (C1 VARCHAR(6) NOT NULL, C2 VARCHAR(6));
    CREATE INDEX TESTIDX1 ON TESTTB (C2 ASC, C1 ASC);
    INSERT INTO TESTTB VALUES ('123456', 'A');
    INSERT INTO TESTTB VALUES ('','B');
    
    SELECT C1, LENGTH(C1) AS LEN
    FROM TESTTB
    WHERE LENGTH(C1)=6;
    
     C1     LEN
     ------ ---
     123456   6
              0  <--- this is incorrect as we are querying for
    length 6 only
    
    Drop the index TESTIDX1, then could get correct result.
     C1     LEN
     ------ ---
     123456   6
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All DB2 10 for z/OS users using varying      *
    *                 length NOT PADDED indexes and columns        *
    *                 defined NOT NULL                             *
    ****************************************************************
    * PROBLEM DESCRIPTION: SQLINCORROUT occurred for query using   *
    *                      index access path with predicate        *
    *                      push-down and NOT PADDED index defined  *
    *                      on varying length NOT NULL columns      *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    SQLINCORROUT occurred while evaluating predicate for empty
    string.
    When empty string was detected, data was not moved to be
    evaluated; causing predicate to be evaluated based on residual
    data that had already been evaluated. The length of the string
    should always be moved, but skipped for empty strings.
    
    
    Additional Keywords: SQLINCORR SQLINCORROUT INCORROUT
                         DB2INCORR/K SQLINDEX
    

Problem conclusion

  • DB2 has been modified to correctly evaluate empty string data.
    

Temporary fix

  • *********
    * HIPER *
    *********
    

Comments

APAR Information

  • APAR number

    PM85792

  • Reported component name

    DB2 OS/390 & Z/

  • Reported component ID

    5740XYR00

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-03-27

  • Closed date

    2013-04-17

  • Last modified date

    2013-06-04

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

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

    UK93545

Modules/Macros

  •    DSNKMVKY
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RA10 PSY UK93545

       UP13/05/03 P F305

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

DB2 for z/OS

Software version:

A10

Reference #:

PM85792

Modified date:

2013-06-04

Translate my page

Machine Translation

Content navigation