DB2 - Problembeschreibung
Problem IC79029 | Status: Geschlossen |
INCORRECT RESULTS OR SQL0901 RETURNED WHEN FOR BIT DATA ARGUMENT USED BY LIKE, LOCATE, POSSTR, OR POSITION WITHIN A SQL UDF | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
Under some collating sequences, a query can return incorrect results or a SQL0901 error code when a FOR BIT DATA argument is passed to a SQL user-defined function expecting mixed data input parameters and that parameter is used by a LIKE, LOCATE, LOCATE_IN_STRING, INSTR, POSSTR or POSITION built-in function. The following example should return 'T' but will return 'F' if you are using an affected collation prior to the fixpak containing the fix. CREATE FUNCTION F(x varchar(10)) RETURNS varchar(1) deterministic no external action reads sql data return case when x like '%def' then 'T' else 'F' end; VALUES F( cast( 'abcdef' as varchar(10) for bit data ) ); | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * . * **************************************************************** * RECOMMENDATION: * * Apply version 9.7 Fix Pack 5 on the database server. * **************************************************************** | |
Local-Fix: | |
Cast the function input to MIXED DATA prior to passing it as input to the SQL UDF or change the UDF definition to expect BIT DATA columns. | |
verfügbare FixPacks: | |
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows | |
Lösung | |
Problem was first fixed in Version 9.7 Fix Pack 5. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 03.10.2011 19.12.2011 19.12.2011 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7.FP5 | |
Problem behoben lt. FixList in der Version | |
9.7.0.5 |