DB2 - Problembeschreibung
Problem IC75887 | Status: Geschlossen |
EXPRESSIONS DEFINED AS CHAR() WITH BIT DATA IN A CURSOR RETURNED FROM A STORED PROCEDURE MISS BIT DATA INFORMATION | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
The following query: SELECT cast(x'619e0000b58d0101' as char(8) for bit data) FROM sysibm.sysdummy1 comes back to the client indicating the results are CHAR(8) FOR BIT DATA However, when run as: create or replace procedure p1 () dynamic result sets 1 BEGIN DECLARE a CHAR(8) FOR BIT DATA; DECLARE cur_sel_1 CURSOR WITH RETURN TO CLIENT WITH HOLD FOR SELECT a FROM SYSIBM.SYSDUMMY1; SELECT cast(x'619e0000b58d0101' as char(8) for bit data) INTO a FROM SYSIBM.SYSDUMMY1; OPEN cur_sel_1; END The column expression type is returned as CHAR(8) and the binary information is incorrectly interpreted/converted. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * All * **************************************************************** * PROBLEM DESCRIPTION: * * The following query: * * * * * * * * SELECT cast(x'619e0000b58d0101' as char(8) for bit data) * * * * * * * * FROM sysibm.sysdummy1 * * * * * * * * * * * * * * * * comes back to the client indicating the results are CHAR(8) * * FOR * * BIT DATA * * * * * * * * * * * * However, when run as: * * * * * * * * * * * * * * * * create or replace procedure p1 () * * * * * * * * dynamic result sets 1 * * * * * * * * BEGIN * * * * * * * * DECLARE a CHAR(8) FOR BIT DATA; * * * * * * * * * * * * * * * * DECLARE cur_sel_1 CURSOR * * * * * * * * WITH RETURN TO CLIENT * * * * * * * * WITH HOLD * * * * * * * * FOR * * * * * * * * SELECT a FROM SYSIBM.SYSDUMMY1; * * * * * * * * * * * * * * * * SELECT cast(x'619e0000b58d0101' as char(8) for bit * * data) * * * * * * INTO a * * * * * * * * FROM SYSIBM.SYSDUMMY1; * * * * * * * * * * * * * * * * OPEN cur_sel_1; * * * * * * * * END * * * * * * * * * * * * * * * * The column expression type is returned as CHAR(8) and the * * binary * * information is incorrectly interpreted/converted. * **************************************************************** * RECOMMENDATION: * * Upgrade to Db2 9.7 Fix Pack 5 * **************************************************************** | |
Local-Fix: | |
When returning a cursor for the query below SELECT a FROM SYSIBM.SYSDUMMY1 The workaround is to cast the result column: DECLARE cur_sel_1 CURSOR WITH RETURN TO CLIENT WITH HOLD FOR SELECT cast( a as char(8) for bit data ) FROM SYSIBM.SYSDUMMY1; -- | |
verfügbare FixPacks: | |
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows | |
Lösung | |
First fixed in DB2 9.7 Fix Pack 5 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 19.04.2011 15.02.2012 15.02.2012 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7.FP5 | |
Problem behoben lt. FixList in der Version | |
9.7.0.5 |