IBM Support

IT12093: DB2 MIGHT PRODUCE INCORRECT RESULTS WHEN RUNNING QUERIES WITH EQUALITY CHAR/VARCHAR PREDICATES.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as fixed if next.

Error description

  • Under rare scenarios, DB2 might produce incorrect results if the
    following conditions are true:
    1) The query contains two or more subselects and tables
    2) Each of these have atleast one column of type char and at
    least one table has one column of type varchar
    3) One equality join predicate in subselect on char and varchar
    column
    4) one equality join predicate with char column in left and
    varchar column in right of select and
        redundant local equality predicates on both of these columns
    
    eg. Let table t1 has a varchar column c1, table t2 has a char
    column c1 and table t3 has a char column c1.
    The following query may produce wrong result.
    
     select tmp.c1  from t3,
          (select  t1.c1 from t1 inner join   t2  on (t1.c1 =t2.c1))
    tmp
          where ( t3.c1  =tmp.c1
                        and  t3.c1  = 'a'
                        and  tmp.c1 = 'a'
          );
    

Local fix

  • Please remove the join predicate or any of the redundant
    predicates in the select
        i.e. Remove any of  t3.c1  =tmp.c1, t3.c1  = 'a' and  tmp.c1
    = 'a'
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All who runs query matching the APAR condition.              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Please apply local fix.                                      *
    ****************************************************************
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    IT12093

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-11-04

  • Closed date

    2017-03-08

  • Last modified date

    2017-07-31

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

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

    IT19297 IT19298

Fix information

Applicable component levels

  • R970 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"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:
31 July 2017