IBM Support

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

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
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 11.1 Mod 2 Fix Pack 2 or higher               *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 11.1 Mod 2 Fix Pack 2
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT21361

  • 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-07-10

  • Closed date

    2017-10-24

  • Last modified date

    2017-10-24

  • 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

[{"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:
24 October 2017