suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IT22826 Status: Closed

WRONG RESULT WHEN PREDICATE HAS CONCATENATED CONSTANT AND COLUMN.

product:
DB2 FOR LUW / DB2FORLUW / B10 - DB2
Problem description:
Db2 may produce wrong result when the following conditions are 
met: 
1) The query has an equality predicate 
2) The equality predicate has a constant string in one side and 
   a constant concatenated with a fixed length character column 
on the other side 
3) The number of characters in the constant part of 
concatenation is less than the 
   number of characters in the constant used in the other side 
of the predicate. 
4) SYSIBM.NLS_STRING_UNITS is set to 'CODEUNITS32' 
 
Example: 
CREATE TABLE T (C CHAR(4 CODEUNITS32) NOT NULL); 
insert into T values('BCD'); 
select * from T where 'ABCD'='A'||C; 
 
The expected result is 1 row : 
C 
---------------- 
BCD 
 
  1 record(s) selected. 
 
and it generates 0 rows, which is wrong.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All Db2 for Linux, UNIX, and Windows users                   * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to Db2 Version 11.1 Mod 3 Fix Pack 3 for Linux,      * 
* UNIX, and Windows or later                                   * 
****************************************************************
Local Fix:
Rewrite the query by splitting the predicate so that 
concatenation gets removed: 
 
select * from T where 'A'='A' and 'BCD'=C; 
 
or rewrite to remove the constant part of the predicate as: 
select * from T where 'BCD'=C;
available fix packs:
Db2 Version 11.1 Mod 3 Fix Pack 3 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod3 Fix Pack3 iFix001 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod3 Fix Pack3 iFix002 for Linux, UNIX, and Windows

Solution
First fixed in Db2 Version 11.1 Mod 3 Fix Pack 3 for Linux, 
UNIX, and Windows
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
18.10.2017
16.03.2018
16.03.2018
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)