IC91173: SQL_COLUMN_LENGTH RETURNS A LENGTH OF 16 INSTEAD OF 26 FOR TIMES TAMP COLUMNS WITH PATCH1=131072 ENABLED IN THE DB2CLI.INI FILE

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • By definition, the PATCH1=131072 does the following
    "This forces the driver to describe a TIMESTAMP column as an
    SQL_CHAR(26) column instead, when it is part of an unique index.
    "
    
    In DB2 v7.2 and before the value of SQL_COLUMN_LENGTH (via a
    call to SQLColAttributes) returned a value of 16 for timestamp
    columns.  When PATCH1=131072 was enabled it returned a value of
    26 for timestamp columns. After v7.2, the length always returns
    a value of 16 regardless of if PATCH1=131072 is enabled or not.
    
    This APAR will allow DB2 work like it used to in DB2 v7.2 and
    return a length of 26 when PATCH1=131072 is enabled.
    
    A symptom seen in applications is an error such as:
    [IBM][CLI Driver] CLI0111E  Numeric value out of range.
    SQLSTATE=22003
    
    The application may be relying on the return value of
    SQL_COLUMN_LENGTH for the length used for SQLBindCol().  If
    SQL_COLUMN_LENGTH returns a value of 16 and the column is bound
    using this value, it will be too small to hold the 26 character
    long timestamp value.  When PATCH1=131072 is enabled after this
    APAR, SQL_COLUMN_LENGTH will return 26 and the application
    relying on this value for the length used for SQLBindCol() will
    be bound to an appropriate length to hold the 26 character long
    timestamp value.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 v9.7 Fixpack 9                                *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 v9.7 Fixpack 9
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC91173

  • 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-03-28

  • Closed date

    2013-12-17

  • Last modified date

    2013-12-17

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

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

    IC95333 IC96270

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP



Rate this page:

(0 users)Average rating

Document information


More support for:

DB2 for Linux, UNIX and Windows

Software version:

9.7

Reference #:

IC91173

Modified date:

2013-12-17

Translate my page

Machine Translation

Content navigation