IBM Support

IC72043: Db2look dependency on locale settings might introduce wrong values on mimic information

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Given the following table:
    
    CREATE TABLE "TEST"."TAB1"  (
                      "FIELDTYPE" CHAR(1) FOR BIT DATA )
    
    
    db2 " select hex(HIGH2KEY) from sysstat.columns  WHERE COLNAME =
    'FIELDTYPE' AND TABNAME = 'TAB1' AND TABSCHEMA = 'TEST' "
    27E827
    
    The db2look output of
    
    db2look -d tlook -m -l -a -e -z TEST -t TAB1 -o tlook.out
    
    Depending on the locale settings, can show in the mimic
    information:
    
    
    UPDATE SYSSTAT.COLUMNS
    SET COLCARD=36,
        NUMNULLS=0,
        SUB_COUNT=-1,
        SUB_DELIM_LENGTH=-1,
        AVGCOLLENCHAR=-1,
        HIGH2KEY=X'1A',  <<< This is incorrect and we are
    introducing incorrect values if we replay this ddl
        LOW2KEY=X'14',
        AVGCOLLEN=2
    WHERE COLNAME = 'FIELDTYPE' AND TABNAME = 'TAB1' AND TABSCHEMA =
    'TEST';
    
    or
    
    UPDATE SYSSTAT.COLUMNS
    SET COLCARD=36,
        NUMNULLS=0,
        SUB_COUNT=-1,
        SUB_DELIM_LENGTH=-1,
        AVGCOLLENCHAR=-1,
        HIGH2KEY='',  In here we have the character representation
    of 0xE28 which is a e with a tilde <<< this is incorrect and if
    we replay this ddl it will actually fail
        LOW2KEY=X'14',
        AVGCOLLEN=2
    WHERE COLNAME = 'FIELDTYPE' AND TABNAME = 'TAB1' AND TABSCHEMA =
    'TEST';
    
    Depending on the locale settings
    
    
    The correct value should be:
    
    UPDATE SYSSTAT.COLUMNS
    SET COLCARD=36,
        NUMNULLS=0,
        SUB_COUNT=-1,
        SUB_DELIM_LENGTH=-1,
        AVGCOLLENCHAR=-1,
        HIGH2KEY=X'E8',
        LOW2KEY=X'14',
        AVGCOLLEN=2
    WHERE COLNAME = 'FIELDTYPE' AND TABNAME = 'TAB1' AND TABSCHEMA =
    'TEST '
    

Local fix

  • Check settings of LC_CTYPE as db2look is using isalnum calls.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * The fix will review the use of isalnum calls by db2look      *
    * code, as                                                     *
    * these calls are locale dependent (on LC_CTYPE).              *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 Version 9.1 and Fix Pack 10                   *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in DB2 Version 9.1 and Fix Pack 10
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC72043

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-10-20

  • Closed date

    2011-06-10

  • Last modified date

    2011-06-10

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

    IC71820

  • 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

  • R910 PSY

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.1

Reference #: IC72043

Modified date: 10 June 2011