IBM Support

IT28641: SUBSTR IN COLUMN ORGANIZED COLUMN COMPARISON RETURN WRONG RESULTS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • Comparing a column from a column-organized table with an
    expression including the SUBSTR function may return wrong
    results, e.g.:
    
    db2 "insert into T(c1) values('201803')"
    db2 "select C1 from T where substr(C1,1,6) =
    substr('2018-03',1,4)|| substr('2018-03',6,2)"
    
    The problem occurs when the column is defined with string length
    unit CODEUNITS32 and the SUBSTR expression has constant
    arguments.
    

Local fix

  • Replace the constant SUBSTR expression with a constant, e.g.
    replace SUBSTR('2018-03',1,4) with '2018' and replace
    SUBSTR('2018-03',6,2) with '03'.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 version 11.1.4.6                              *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 version 11.1.4.6
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT28641

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-04-02

  • Closed date

    2021-03-17

  • Last modified date

    2021-03-29

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

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

    IT35058

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1"}]

Document Information

Modified date:
31 March 2021