DB2 - Problembeschreibung
Problem IT02318 | Status: Geschlossen |
LOCATE_IN_STRING RETURNS 0 WHEN INSTANCE PARAMETER IS SET TO SMALLINT | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problembeschreibung: | |
Locate_in_string function should return the starting position of a string (called the search-string ) within another string (called the source-string). Locate_in_string returns 0 when instance parameter is set to SMALLINT. Function expects the instance parameter to be type INTEGER, but SMALLINT values are not being cast to INTEGER as expected. LOCATE_IN_STRING ( source-string, search-string, [start], [instance], [CODEUNITS16, CODEUNITS32, OCTETS] ) Here is a simple reproduction of incorrect behaviour, where we expect the number 2 to be the returned value of the locate_in_string function. $ db2 "values locate_in_string('2,0', ',', 1, cast(1 as smallint))" 1 ----------- 0 1 record(s) selected. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to product DB2 Version 10.5 Fix Pack 5 or higher. * **************************************************************** | |
Local-Fix: | |
The immediate workaround is to use an explicit cast to make the parameter an INTEGER value; for example, $ db2 "values locate_in_string('2,0', ',', 1, cast(1 as integer))" 1 ----------- 2 1 record(s) selected. | |
Lösung | |
Problem was fixed in DB2 Version 10.5 Fix Pack 5. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 06.06.2014 18.03.2015 18.03.2015 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
10.5.0.5 |