IC89621: QUERY COMPILATION SHOULD RETURN SQL0418N IF IT HAS UNTYPED GROUPING SETS COLUMN

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as fixed if next.

Error description

  • If a query has grouping sets and any group-by column in the
    grouping sets is a untyped null or parameter marker, the query
    compilation should return error SQL0418N.
    
    Without this fix, query compilation may fail with the following
    dumped into db2diag:
    
    2012-12-26-14.30.52.720355-300 E3002681E1454       LEVEL: Info
    (Origin)
    PID     : 10202                TID  : 46917589395776PROC :
    db2sysc 1
    INSTANCE: XXXXXXXX             NODE : 001          DB   : XXXXX
    APPHDL  : 1-19111              APPID:
    144.14.11.203.4421.121224160222
    AUTHID  : XXXXX
    EDUID   : 560                  EDUNAME: db2agent (XXXXX) 1
    FUNCTION: DB2 UDB, SW- common services, sqlnn_cmpl, probe:650
    MESSAGE : ZRC=0x80310025=-2144272347=SQLNN_E_BAD
              "unexpected error and state is bad"
    DATA #1 : String, 62 bytes
    An unexpected error was detected during statement compilation.
    DATA #2 : Boolean, 1 bytes
    true
    DATA #3 : Boolean, 1 bytes
    false
    DATA #4 : Boolean, 1 bytes
    false
    DATA #5 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
     sqlcaid : SQLCA     sqlcabc: 136   sqlcode: -901   sqlerrml: 21
     sqlerrmc: invalid qnc assigment
     sqlerrp : SQLNQ085
     sqlerrd : (1) 0x801A006D      (2) 0x00000000      (3)
    0x00000000
               (4) 0x00000000      (5) 0xFFFFFF9C      (6)
    0x00000001
     sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)
    
               (7)      (8)      (9)      (10)        (11)
     sqlstate:
    DATA #6 : String, 286 bytes
    Compiler error stack for rc = -2144272347:
    sqlnn_cmpl[370]
    sqlnr_exe[1180]
    sqlnr_rcc[100]
    sqlnr_seq[100]
    sqlnr_comp[110]
    sqlnr_prep4_action[11025]
    sqlnq_expand_rollup[200]
    sqlnr_cube2union[300]
    sqlnr_cr8_grouping_set_box[110]
    sqlnr_grouping_item_mappin[300]
    sqlnq_pid::replace_qnc[100]
    
    Stack dump is similar to the following:
    
    ossDumpStackTraceEx
    OSSTrapFile::dumpEx
    sqlo_trce
    sqloDumpDiagInfoHandler
    pthread_kill
    sqloDumpEDU
    sqldDumpContext
    sqlrr_dump_ffdc
    sqlzeDumpFFDC
    sqlzeSqlCode
    sqlnn_erds
    sqlnq_pid::replace_qnc
    sqlnr_grouping_item_mapping
    sqlnr_cr8_grouping_set_box
    sqlnr_cube2union
    sqlnq_expand_rollup
    sqlnr_prep4_action
    sqlnr_comp
    sqlnr_seq
    sqlnr_rcc
    sqlnr_exe
    sqlnn_cmpl
    sqlnn_cmpl
    sqlra_compile_var
    sqlra_find_var
    sqlra_get_var
    sqlrr_prepare
    sqljs_ddm_prpsqlstt
    sqljsParseRdbAccessed
    sqljsParse
    sqljsDrdaAsDriver
    sqeAgent::RunEDU()
    sqzEDUObj::EDUDriver()
    sqlzRunEDU
    sqloEDUEntry
    clone
    

Local fix

  • Cast untyped null or parameter marker to type char (1). For
    example, replace NULL with CAST(NULL AS CHAR(1)).
    

Problem summary

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

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    IC89621

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-01-17

  • Closed date

    2013-12-18

  • Last modified date

    2013-12-18

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

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

    IC96295 IC96347

Fix information

Applicable component levels

  • R970 PSY

       UP



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

DB2 for Linux, UNIX and Windows

Software version:

9.7

Reference #:

IC89621

Modified date:

2013-12-18

Translate my page

Machine Translation

Content navigation