IBM Support

IT28641: SUBSTR IN COLUMN ORGANIZED COLUMN COMPARISON RETURN WRONG RESULTS

Subscribe

You can track all active APARs for this component.

 

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

  • RA10 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":"11.1","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
04 May 2022