DB2 - Problem description
Problem IT19298 | Status: Closed |
DB2 MIGHT PRODUCE INCORRECT RESULTS WHEN RUNNING QUERIES WITH EQUALITY CHAR/VARCHAR PREDICATES. | |
product: | |
DB2 FOR LUW / DB2FORLUW / B10 - 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 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' ); | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * engn_sqnr * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * The fix is in v111 GA * **************************************************************** | |
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' | |
Solution | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 16.02.2017 07.06.2017 07.06.2017 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |