IBM Support

IT22011: DB2 DOES NOT CAST THE JOIN COLUMNS CORRECTLY, LEADING TO A -901 ERROR IN CDE FOR DPF

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • In the CDE hash join, the type and length must exactly match
    between the two joining keys.
    This is because the comparison is done in binary.
    
    In the following example, DB2 does not cast the join columns
    correctly, leading to a -901 error in CDE:
    
    create table coltab1 (ssn varchar(20)) organize by column;
    create table coltab2 (ssn decimal(9,0)) organize by column;
    
    
    db2 "SELECT  base.ssn
            FROM    coltab1  base
            INNER JOIN coltab2 mn
                  ON TO_CHAR(base.ssn) = TO_CHAR(mn.ssn)"
    
    SSN
    --------------------
    SQL0901N  The SQL statement or command failed because of a
    database system
    error. (Reason "unexpected error at
    GetJoinPayloadEvaluator.cpp:136".)
    SQLSTATE=58004
    
    This is related to APAR IT21361. This APAR covers the fix for
    DPF configurations.
    

Local fix

  • Use CHAR function to set both sides of the comparison to the
    same number of characters.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All Db2 Coulumn Organized on DPF users                       *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 Version 11.1 Mod 3 Fix Pack 3 for Linux,      *
    * UNIX, and Windows or later                                   *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 Version 11.1 Mod 3 Fix Pack 3 for Linux,
    UNIX, and Windows
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT22011

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-08-15

  • Closed date

    2018-03-16

  • Last modified date

    2018-03-16

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

  • 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

  • RB10 PSN

       UP

  • RB10 PSY

       UP

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

Document Information

Modified date:
16 March 2018