Fixes are available
DB2 Version 11.1 Mod1 Fix Pack1 iFix001 for Linux, UNIX, and Windows
DB2 Version 11.1 Mod 2 Fix Pack 2 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod2 Fix Pack2 iFix001 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod2 Fix Pack2 iFix002 for Linux, UNIX, and Windows
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
Db2 Version 11.1 Mod4 Fix Pack4 iFix001 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod 4 Fix Pack 4 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod 4 Fix Pack 6 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod 4 Fix Pack 5 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod 4 Fix Pack 7 for Linux, UNIX, and Windows
APAR status
Closed as program error.
Error description
When using string equality predicates containing strings that have differing code units (OCTETS, CODEUNITS16, CODEUNITS32), DB2 may return incorrect results. Keep in mind that the default code units used may differ depending on the current string_units and nchar_mapping database configuration parameters and the NLS_STRING_UNITS global variable. Example (with the default string_units database config parameter set to SYSTEM): CREATE TABLE T1 (a CHAR(2 CODEUNITS32) NOT NULL, b CHAR(5 CODEUNITS32) NOT NULL) INSERT INTO T1 VALUES ('12', '345') SELECT a||b FROM T1 WHERE a='12' AND a||b LIKE '%12345%' Incorrect result: 1 ---------------------------- 0 record(s) selected.
Local fix
In the example above, either modify the string_units database config parameter to match the string constant's code units (OCTETS) with the column's (CODEUNITS32), or ensure each string reference in the equality expression uses the same code units by casting when needed: SELECT a||b FROM T1 WHERE CHAR(a)='12' AND a||b LIKE '%12345%' 1 ---------------------------- 12345 1 record(s) selected.
Problem summary
**************************************************************** * USERS AFFECTED: * * CODEUINTS usage * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * See Error Description. Please, install this fix. * ****************************************************************
Problem conclusion
See Error Description. Please, install this fix.
Temporary fix
Comments
APAR Information
APAR number
IT16703
Reported component name
DB2 FOR LUW
Reported component ID
DB2FORLUW
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
YesHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2016-08-22
Closed date
2017-10-10
Last modified date
2017-10-10
APAR is sysrouted FROM one or more of the following:
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
RB10 PSY
UP
Document Information
Modified date:
04 May 2022