IBM Support

IC80456: LIKE CLAUSES MIGHT RETURN INCORRECT RESULTS FOR COLUMNS WITH VARCHAR DATA TYPE IN UNICODE DATABASES

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • In Unicode databases when clients with double-byte codepage are
    used, LIKE clauses might return incorrect results for columns
    defined as varchar data type.
    
    For example, you create a table t1 and then issue INSERT
    statements with values similar to the following statements:
    
    db2 "create table t1 (NAME varchar(10))"
    db2 "insert into t1 values ('a_abc')"
    db2 "insert into t1 values ('a_bc')"
    db2 "insert into t1 values ('a__c')"
    db2 "insert into t1 values ('a2bc')"
    db2 "insert into t1 values ('aabc')"
    db2 "insert into t1 values ('abc')"
    
    Then you run the following queries:
    db2 "select * from t1 where NAME LIKE '%a__'"    <<-- SQL #1
    db2 "select * from t1 where NAME LIKE '%a__a%'"  <<-- SQL #2
    db2 "select * from t1 where NAME LIKE '%a__b%'"  <<-- SQL #3
    
    The number of rows that you receive from the above queries is: 5
    :  1 :  1, which is incorrect. The correct number of rows is: 6
    :  1 :  4 and is returned by the above queries when the column
    NAME is defined as char data type.
    
    Note: In the above statements and queries, '__' represents one
    double-byte underscore character and '_' represents one
    single-byte underscore character.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * DB2 UDB Version 9.7                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Version 9.7 FixPack 6.                            *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in DB2 UDB Version 9.7 FixPack 6.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC80456

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    YesSpecatt / Pervasive

  • Submitted date

    2011-12-15

  • Closed date

    2012-06-06

  • Last modified date

    2012-06-06

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
06 June 2012