IBM Support

IC91416: DB2 CAN TRAP WHEN COMPILING A SUB-QUERY that is APPLIED ON XMLQUERY()

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • DB2 can trap when it compiles a SQL query that has a sub-query
    applied on XMLQUERY(), and the query block that contains the
    sub-query has more than 64 predicates.
    
    The following is an example of the sub-query:
    
    XMLCAST(XMLQUERY(...)   AS CHAR(8)) IN (SELECT X FROM TABLE1)
    
    
    It can generate the stack traces below:
    
    -------------- Stack Trace -------------------------
    sqlno_copy_plan_map
    copy_plan_args
    sqlno_copy_function_args
    sqlno_copy_plan__FCP13sqlno
    sqlno_crule_save_plans
    sqlno_crule_access
    sqlno_crule_access
    sqlno_find_plan_chain
    sqlno_get_best_plan
    sqlno_crule_nljn_inner
    sqlno_crule_nljn
    sqlno_crule_join_choices
    sqlno_crule_join_order
    sqlno_crule_join_root
    sqlno_crule_join
    sqlno_gen_partitions_for_QTB
    sqlno_plan_end_opr
    sqlno_each_opr
    sqlno_walk_qun
    sqlno_each_opr
    sqlno_top_qtb
    sqlno_each_qur
    sqlno_scan_qgm
    sqlno_planning_scan
    sqlno_planning_phase
    sqlno_exe
    sqlno_exe
    sqlnn_cmpl
    sqlnn_cmpl
    sqlra_compile_var
    sqlra_find_var
    sqlra_get_var
    sqlrr_prepare
    sqljs_ddm_prpsqlstt
    sqljsParseRdbAccessed
    sqljsParse.fdpr.clone.77
    @63@sqljsSqlam
    @63@sqljsDriveRequests
    @63@sqljsDrdaAsInnerDriver
    sqljsDrdaAsDriver
    RunEDU
    EDUDriver
    sqloEDUEntry
    
    -------------- Stack Trace -------------------------
    pthread_kill
    sqloDumpEDU
    sqle_panic
    sqle_trap
    sqlzAssertFailedValist
    sqlzAssertFailed
    sqlo_md_mcpy
    sqlno_copy_setN
    sqlno_difference_setsN
    sqlno_difference_set
    sqlno_prop_preds
    sqlno_prop_filter
    FILTER__FP13sqlno
    sqlno_crule_xscan
    sqlno_crule_access_root
    sqlno_crule_access
    sqlno_find_plan_chain
    sqlno_get_best_plan
    sqlno_get_best_plan
    sqlno_crule_nljn_inner
    sqlno_crule_nljn
    sqlno_crule_join_choices
    sqlno_crule_join_order
    sqlno_crule_join_root
    sqlno_crule_join
    sqlno_gen_partitions_for_QTB
    sqlno_plan_end_opr
    sqlno_call_sf
    sqlno_each_opr
    sqlno_call_sf
    sqlno_walk_qun
    sqlno_call_sf
    sqlno_each_opr
    sqlno_call_sf
    sqlno_top_qtb
    sqlno_call_sf
    sqlno_each_qur
    sqlno_call_sf
    sqlno_scan_qgm
    sqlno_planning_scan
    sqlno_planning_phase
    sqlno_exe
    sqlnn_cmpl
    sqlnn_cmpl
    sqlra_compile_var
    sqlra_find_var
    sqlra_get_var
    sqlrr_prepare
    sqljs_ddm_prpsqlstt
    sqljsParseRdbAccessed
    sqljsParse
    sqljsSqlam
    sqljsDriveRequests
    sqljsDrdaAsInnerDriver
    sqljsDrdaAsDriver
    RunEDU
    EDUDriver
    sqlzRunEDU
    qloEDUEntry
    
    -----------------------------------
    
    On DB2 9.7FP8 it can generat a FODC application error with the
    stack below, however the DB2 instance doesn't crash.
    
    -------------- Stack Trace -------------------------
    pthread_kill
    sqloDumpEDU
    sqldDumpContext
    sqldDumpContext
    sqlrr_dump_ffdc
    sqlzeDumpFFDC
    sqlzeSqlCode
    sqlnn_erds
    sqlnn_erds
    sqlno_copy_function_args
    sqlno_copy_plan
    sqlno_copy_plan_map
    copy_plan_args
    sqlno_copy_function_args
    sqlno_copy_plan
    sqlno_crule_save_plans
    sqlno_crule_access
    sqlno_crule_access
    sqlno_find_plan_chain
    sqlno_get_best_plan
    sqlno_crule_nljn_inner
    sqlno_crule_nljn
    sqlno_crule_join_choices
    sqlno_crule_join_order
    sqlno_crule_join_root
    sqlno_crule_join
    sqlno_gen_partitions_for_QTB
    sqlno_plan_end_opr
    sqlno_each_opr
    sqlno_walk_qun
    sqlno_each_opr
    sqlno_top_qtb
    sqlno_each_qur
    sqlno_scan_qgm
    sqlno_planning_scan
    sqlno_planning_phase
    sqlno_exe
    sqlno_exe
    sqlnn_cmpl
    sqlra_compile_var
    sqlra_find_var
    sqlra_get_var
    sqlrr_prepare
    sqljs_ddm_prpsqlstt
    sqljsParseRdbAccessed
    sqljsParse.fdpr.clone.0
    @63@sqljsSqlam
    @63@sqljsDriveRequests
    @63@sqljsDrdaAsInnerDriver
    RunEDU
    EDUDriver
    sqloEDUEntry
    
    -----------------------------------
    
    
    
    There is no workaround.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Problem Description above.                               *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 Version 9.7 Fix Pack 9.                       *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 Version 9.7 Fix Pack 9.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC91416

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-04-08

  • Closed date

    2013-12-23

  • Last modified date

    2013-12-23

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

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

    IC91811 IC95245

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC91416

Modified date: 23 December 2013