IBM Support

IC84899: DATABASE OPERATIONS MIGHT FAIL WITH "KEY DATA MISMATCH" ERRORS, OR ROWS THAT EXIST IN THE DATABASE CANNOT BE FOUND

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • This APAR applies to Unicode databases using language aware
    collation where a column of string type (for example: char,
    varchar, clob types) contain invalid UTF-8 characters.
    
    This APAR does not apply if  there is no invalid UTF-8 character
    in any of the columns.  See
    http://www.unicode.org/versions/Unicode6.0.0/ch03.pdf (Table
    3-7) for well formed UTF-8 Byte Sequences.
    
    If there are invalid UTF-8 characters in a Unicode database
    created using language aware collation, the following errors can
    occur:
    
    1) SET INTEGRITY may fail with the following error:
    
    SQL0901N  The SQL statement or command failed because of a
    database system error. (Reason "Key data mismatch encountered
    during key delete".)
    SQLSTATE=58004
    
    2) DELETE of a row that exists in the table may fail with the
    following error:
    
    SQL0100W  No row was found for FETCH, UPDATE or DELETE; or the
    result of a query is an empty table.  SQLSTATE=02000
    
    3). Incorrect data is returned from the sort statement or data
    is not sorted correctly.
    
    
    This APAR is applicable if :
    
    1.  The Unicode database using language aware collation was
    created on a previous release, migrated to v10.1.0, and had a
    column using a string type  that contains invalid UTF-8
    characters.
    
    2.  A new Unicode database is  created using language aware
    collation on v10.1. 0 and one of columns is using a string type
    contains invalid UTF-8 characters.
    
    The issue affects database collation. If there  is no other
    object that depends on that column, fix the invalid character to
    get the correct sort order in the query processing. If the
    database contains other objects, such as indexes or MQT, which
    depend on the column containing invalid characters, then drop
    the database object(s) that depend on the object with invalid
    characters.  Apply the APAR. Recreate or refresh the affected
    object(s). Rebind the static packages.
    
    In the following example, a hex value is being inserted that
    denotes an invalid UTF-8 character, resulting in the server
    failing to delete the row:
    
    db2 "CREATE DB WSDB USING CODESET UTF-8 TERRITORY US COLLATE
    USING SYSTEM_819_US"
    db2 connect to wsdb
    db2 "create table t1 '(c1 varchar(20))'"
    db2 "insert into t1 values ('ROMANIA'), ('SAINT'),
    (x'52C9554E494F4E')"
    db2 "create index i1 on t1 (c1)"
    
    db2 delete from t1 where "c1=x'52C9554E494F4E'"
    SQL0100W  No row was found for FETCH, UPDATE or DELETE; or the
    result of a query is an empty table.  SQLSTATE=0200
    
    To fix the issue in the example: Drop the index, apply the APAR,
    and recreate the index.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All platforms except aix, linuxppc and linux390.             *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 v10.1.0.1 (v10 fp1).                          *
    ****************************************************************
    

Problem conclusion

  • Upgrade to DB2 v10.1.0.1 (v10 fp1).
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC84899

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    YesSpecatt / New Function / Installability /

  •  

    Pervasive / Serviceability / Xsystem

  • Submitted date

    2012-06-25

  • Closed date

    2012-09-13

  • Last modified date

    2012-09-13

  • 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

  • RA10 PSN

       UP

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.1"}]

Document Information

Modified date:
20 September 2021