home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
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
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

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
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 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 FixList