IBM Support

IT19980: DB2 MAY FAIL EXECUTING QUERY DURING SEMIJOIN PROCESSING ON CDE

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • During execution of SQL containing JOINs, DB2 may choose
    SEMIJOIN strategy. The problem happens during join pushdown to
    CDE columnar engine. DB2 fails during construction of right
    filtering in case when outer/left side of the join at the top is
    a nested query. Once this happens, SQL returns SQL0901N error:
    
    SQL0901N  The SQL statement or command failed because of a
    database system
    error. (Reason "unexpected error at Parser.cpp:3723".)
    SQLSTATE=58004
    
    In the db2diag.log error is logged in
    ibm_cde::query::Parser::prepareCompositeTree:
    
    2017-02-12-18.14.45.498227-300 I937426A3404         LEVEL: Error
    PID     : 46007304             TID : 189992         PROC :
    db2sysc 0
    INSTANCE: DB2INST1             NODE : 000           DB   :
    SAMPLE
    APPHDL  : 0-45884              APPID:
    10.5.108.200.41560.170212231204
    AUTHID  : DB2INST1             HOSTNAME: node1
    EDUID   : 189992               EDUNAME: db2agent (SAMPLE) 0
    FUNCTION: DB2 UDB, CDE Trace, cdeDiagnosticsFacility, probe:3723
    DATA #1 : String, 235 bytes
    AssertionFailedException: An assertion
    'mKeyJoinMap.find(AuxKeyIdPair(AuxKeyIdPair(queryId,refKey))) !=
    mKeyJoinMap.end()' failed. Additional info: query_qref to
    unknown query qid=7005 kentry=1 in query 8014
    Thrown at Parser.cpp : 3723
    DATA #2 : Function name in Library, 64 bytes
    ibm_cde::query::Parser::prepareCompositeTree(SyntaxTree *, bool)
    DATA #3 : File name, 10 bytes
    Parser.cpp
    CALLSTCK: (Static functions may not be resolved correctly, as
    they are resolved to the nearest symbol)
    
    The corresponding stack :
    
    0        pthread_kill
    1        sqloDumpEDU
    2        sqldDumpContext
    3        sqlrr_dump_ffdc
    4        sqlzeDumpFFDC
    5        sqlzeSqlCode
    6        sqlrrSqlCode
    7        ibm_cde::services::AssertionFailedException::done
    8
    ibm_cde::services::AssertionFailedException::constructAndThrow
    9        ibm_cde::query::Parser::prepareCompositeTree
    10       ibm_cde::query::Parser::parserWrapper
    11       ibm_cde::query::Parser::prepareNestedQuery
    12       ibm_cde::query::Parser::parserWrapper
    13       cdeInterface::initializeData
    14       cdeInterface::openTableScan
    15       sqlriCdeOpen
    16       sqlriCdeQuery
    17       sqlriSectInvoke
    18       sqlrr_process_fetch_request
    19       sqlrr_open
    20       sqljsParseRdbAccessed
    21       sqljsSqlam
    22       sqljsSqlam
    23       sqljsSqlam
    24       sqljsDriveRequests
    25       sqljsDrdaAsInnerDriver
    26       sqeAgent::RunEDU
    27       sqeAgent::RunEDU
    28       sqzEDUObj::EDUDriver
    29       sqloEDUEntry
    

Local fix

  • The workaround is to disable SEMIJOIN. It can be accomplished by
    optimization guidelines for the query:
    
    
    /* <OPTGUIDELINES>
    
    <REGISTRY><OPTION NAME='DB2_CDE_SEMIJOIN' VALUE='0'/></REGISTRY>
    
    </OPTGUIDELINES>     */ ;
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * CDE                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 Version 10.5 Fix Pack 10                      *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in Db2 Version 10.5 Fix Pack 10
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT19980

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    A50

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-03-31

  • Closed date

    2018-07-16

  • Last modified date

    2018-07-16

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

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

    IT22344

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 July 2018