IBM Support

IC70444: SQLSTATISTICS ROUTINE, CLI/ODBC SQLSTATISTICS CALL, JDBC GETINDE XINFO CALL RETURN SQLCODE -413 FOR LARGE VALUES OF CARDINALITY

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Currently, the SYSIBM.SQLSTATISTICS routine and the
    corresponding CLI/ODBC SQLStatistics () andd JDBC getIndexInfo
    calls, return SQLCODE -413 (Overflow occurred during numeric
    data type conversion) if the CARDINALITY returned exceeds
    2147483647.
    
    Per the ODBC specification,  we return CARDINALITY as INTEGER.
    However it is defined as BIGINT in the referenced table
    SYSIBM.SQLSTATISTICS. So, the SQLSTATISTICS routine CASTSs
    CARDINALITY to INTEGER before returning this value.
    
    If the CARDINALITY value returned is greater than the maximum
    allowable INTEGER value (2147483647), then a numeric overflow
    error will occur on the data type conversion (SQLCODE -413).
    
    The design will be changed to return 2147483647 (largest INTEGER
    value) when CARDINALITY cannot fit into INTEGER.
    
    This design is consistent with other IBM-defined views and
    routines which reference CARDINALITY.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Developers and users of IBM DB2 ODBC Driver (and IBM Data    *
    * Server for  ODBC and CLI Driver) applications connecting to  *
    * DB2 servers.                                                 *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Currently, the CLI/ODBC SQLStatistics () and JDBC            *
    * getIndexInfo calls, return SQLCODE -413 (Overflow occurred   *
    * during numeric data type conversion) if the CARDINALITY      *
    * returned exceeds 2147483647.                                 *
    *                                                              *
    *                                                              *
    * Per the ODBC specification,  the IBM DB2 ODBC driver returns *
    * CARDINALITY as INTEGER.                                      *
    * However it is defined as BIGINT in the referenced table      *
    * SYSIBM.SQLSTATISTICS. So, the IBM-defined SQLSTATISTICS      *
    * routine (which is called by SQLStatistics () and JDBC        *
    * getIndexInfo) CASTs CARDINALITY to INTEGER before returning  *
    * this value.                                                  *
    *                                                              *
    *                                                              *
    * If the CARDINALITY value returned is greater than the        *
    * maximum allowable INTEGER value (2147483647), then a numeric *
    * overflow error will occur on the data type conversion        *
    * (SQLCODE -413).                                              *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 version 9.7 Fix Pack 4.                       *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in Version 9.7 Fix Pack 4.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC70444

  • 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

    2010-08-06

  • Closed date

    2011-06-16

  • Last modified date

    2011-06-16

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

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

    IC72744

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 #: IC70444

Modified date: 16 June 2011