IBM Support

IT34658: DB2 QUERY MAY GENERATE FODC AND APP_ERR OR WRONG RESULT IN CERTAIN CONDITIONS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as fixed if next.

Error description

  • Db2 query may generate FODC and APP_Err or wrong result when the
    following conditions are met:
    -NPS mode is set ("export SQL_COMPAT = 'NPS' " for IIAS and
    Netezza compatibility mode)
    -Source is a partitioned column-organized table
    -There is a subtraction between dates
    -At least one argument of the date subtraction is nullable
    
    Repro:
    
    create table t1_date(nullableC1 date ,notnullableC2 date not
    null) organize by column;
    insert into t1_date values(null, current date);SET
    SQL_COMPAT='NPS';
    select (nullableC1-notnullableC2) from t1_date; <<< This should
    return NULL,
    but it results not null value.select
    days_between(nullableC1,notnullableC2) from t1_date;
    
    Customer query generated APP_Err:
    FUNCTION: DB2 UDB, table Q services, sqlkt_pack_tuple, probe:20
    MESSAGE : DIA0001E An internal error occurred. Report the
    following error code
    : "Line=02479, rc1=0x82170001, rc2=0x00000000, rc3=(nil),
    msg=cold=NONULLS zvalue=ISNULL col(11)".
    

Local fix

  • NA
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * db2 luw users                                                *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Db2 query may generate FODC and APP_Err or wrong result when *
    * the following conditions are met:                            *
    * -NPS mode is set                                             *
    * -Source is a partitioned column-organized table              *
    * -There is a subtraction between dates                        *
    * -At least one argument of the date subtraction is nullable   *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 11.5.5.1 or higher                            *
    ****************************************************************
    

Problem conclusion

Temporary fix

  • SET SQL_COMPAT='NPS'
    DB20000I  The SQL command completed successfully.
    

Comments

APAR Information

  • APAR number

    IT34658

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B50

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-10-23

  • Closed date

    2021-03-31

  • Last modified date

    2021-04-06

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

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

Fix information

Applicable component levels

  • RB50 PSY

       UP

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.5"}]

Document Information

Modified date:
31 August 2021