IBM Support

IT22972: QUERY INVOLVING OUTER JOINS HAS WRONG COLUMN RESULT NULLABILITY

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A query involving outer joins may have the wrong column result
    nullability.  For example, the following result column should
    have type 493 (nullable BIGINT) but instead returns type 492
    (not nullable BIGINT).
    
    
       CREATE TABLE T1 ( C1 BIGINT );
       CREATE TABLE T2 ( C2 BIGINT NOT NULL );
       CREATE TABLE T3 ( C3 BIGINT);
    
       describe
         SELECT T2.C2
         FROM
           T1
           LEFT JOIN T2 ON 1=1
           LEFT JOIN T3 ON 1=1
         WHERE T2.C2 = T3.C3;
    
        Column Information
    
        Number of columns: 1
    
        SQL type              Type length  Column name
    Name length
        --------------------  -----------
    ------------------------------  -----------
        492   BIGINT                    8  C2
    2
    
    This only occurs when the semantics of the query dictate a
    nullable result, but - due to predicates - the query cannot
    actually produce a NULL result.  For this reason, this issue
    will rarely be noticeable.  However, it can be a problem in the
    following scenarios:
    
    - import/export: import may produce wrong results when the
    export was based on such a query
    - CREATE TABLE as query, the resulting table column will have
    the wrong nullability
    

Local fix

Problem summary

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

Problem conclusion

  • First fixed in Db2 11.1 Fixpack 3 Mod 2
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT22972

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

  • Closed date

    2018-08-07

  • Last modified date

    2018-08-07

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

    IT22056

  • 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:
07 August 2018