DB2 - Problem description
Problem IT12090 | Status: Closed |
DB2 MIGHT PRODUCE INCORRECT RESULTS WHEN RUNNING QUERIES WITH EQUALITY CHAR/VARCHAR PREDICATES | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem 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 at least 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. T1 (c1 varchar(10)) T2 (c1 char(10)) T3 (c1 char(10)) 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' ); | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * engn_sqnr * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Use the local fix given in APAR Information or use the * * special build provided * **************************************************************** | |
Local Fix: | |
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' | |
Solution | |
See Error Description | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 03.11.2015 25.01.2016 25.01.2016 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.7 |