IBM Support

IT17872: DB2 MAY TRAP IN SQLNR_CHECK_CAN_ADD_GB_DISTINCT WHEN COMPILING SOME QUERIES

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • db2 may trap in sqlnr_check_can_add_gb_distinct when
    preparing/compiling queries having:
       -update query having exists subquery or exists and exists/not
    exists subquery
       -select subquery has correlation
       -exists/not exists subquery has correlation
       -at least one of the correlated column is the same as the
    column to be updated
       -type of the column to be updated and the source column are
    not same
    
    The trap generates the following stack:
    
    0x00001071913E7B10 0x000010000C452F6C
    _Z31sqlnr_check_can_add_gb_distinctP9sqlnq_oprP17sqlnq_qunElemLi
    stRbP3loc + 0x051c
      ( = offset 0xC142F6C in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)
    0x00001071913E7C50 0x000010000C482E40
      ( = offset 0xC172E40 in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)
    0x00001071913E8070 0x000010000C4749B4
    _Z20sqlnr_qrwprep_phase2P3locPi + 0x1394
      ( = offset 0xC1649B4 in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)
    0x00001071913E8940 0x000010000C101EBC
    _Z18sqlnr_prep2_actionP10sqlnr_qrwaPiP14sqlnr_progress + 0x005c
      ( = offset 0xBDF1EBC in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)
    0x00001071913E89C0 0x000010000C3FB3B4
    _Z10sqlnr_compPiiP16sqlnr_rule_stateP10sqlnr_qrwaP14sqlnr_progre
    ss + 0x01e4
      ( = offset 0xC0EB3B4 in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)
    0x00001071913E8AB0 0x000010000C3FB778
    _Z9sqlnr_seqPiP10sqlnr_qrwaP14sqlnr_progressP12sqlnr_rclass +
    0x00d8
      ( = offset 0xC0EB778 in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)
    0x00001071913E8B60 0x000010000C3FBE7C
    _Z9sqlnr_rcciP10sqlnr_qrwaPiP14sqlnr_progress + 0x024c
      ( = offset 0xC0EBE7C in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)
    0x00001071913E8C20 0x000010000C103728 _Z9sqlnr_exeP9sqlnq_qur +
    0x0a58
      ( = offset 0xBDF3728 in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)
    0x00001071913E8F90 0x000010000B1514DC
    _Z10sqlnn_cmplP8sqeAgentP11sqlrrstrings17sqlnn_compileModesP14sq
    lrr_cmpl_enviiPP9sqlnq_qur + 0x785c
      ( = offset 0xAE414DC in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)
    0x00001071913EA5B0 0x000010000B149C5C
    _Z10sqlnn_cmplP8sqeAgentP11sqlrrstrings17sqlnn_compileModesP14sq
    lrr_cmpl_env + 0x002c
      ( = offset 0xAE39C5C in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)
    0x00001071913EA650 0x000010000D4F96F0
    _Z17sqlra_compile_varP8sqlrr_cbP14sqlra_cmpl_envPhitiiiiiP14SQLP
    _LOCK_INFOP16sqlra_cached_varPiS5_Pb + 0x1540
      ( = offset 0xD1E96F0 in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)
    0x00001071913EB060 0x000010000D52136C
    _Z14sqlra_find_varP8sqlrr_cbP17sqlra_cached_stmt13sqlra_stmt_idj
    jPhjthP14sqlra_cmpl_env15sqlra_fill_modePiiS8_iiiS8_P14SQLP_LOCK
    _INFOPP16sqlra_cached_varS8_bSA_Pb + 0x0a2c
      ( = offset 0xD21136C in
    /home/db2inst1/sqllib/lib64/libdb2e.so.1)
    

Local fix

  • db2set -im DB2COMPOPT=NO_UPDATE_COMP
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 11.1 Fix Pack 1                               *
    ****************************************************************
    

Problem conclusion

  • First Fixed in DB2 11.1 Fix Pack 1
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT17872

  • 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

    2016-11-08

  • Closed date

    2017-05-09

  • Last modified date

    2017-05-09

  • 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

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

Document Information

Modified date:
29 June 2020