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 IC90826 Status: Geschlossen

CREATE OR REPLACE FUNCTION CAN REPLACE A SYSTEM-GENERATED CAST FUNCTION FOR
A DISTINCT TYPE

Produkt:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problembeschreibung:
Using CREATE OR REPLACE FUNCTION allows one to replace a 
function signature that is system-generated for a user-defined 
type. Such a function cannot be dropped and therefore should not 
allow the function to be replaced.  Here is a simple example: 
 
create type schema.rrr3 as integer 
DB20000I  The SQL command completed successfully. 
 
-- drop of a generated cast function fails as expected 
drop function rrr3(int) 
DB21034E  The command was processed as an SQL statement because 
it was not a 
valid Command Line Processor command.  During SQL processing it 
returned: 
SQL0658N  The object "SCHEMA.RRR3" cannot be explicitly dropped 
or altered. 
SQLSTATE=42917 
 
-- generated cast function can be used and generates the same 
value as the argument. 
values rrr3(5) 
 
1 
----------- 
          5 
 
  1 record(s) selected. 
 
-- the generated function gets replaced (should fail, but does 
not) 
create or replace function rrr3(p1 int) returns rrr3 begin end 
DB20000I  The SQL command completed successfully. 
 
-- the replaced function gets invoked since it returns null 
instead of 5 
values rrr3(5) 
 
1 
----------- 
          - 
 
  1 record(s) selected. 
 
-- this breaks the CAST specification from integer to distinct 
type 
values cast(5 as rrr3) 
SQL0461N  A value with data type "SYSIBM.INTEGER" cannot be CAST 
to type 
"SWAGRMAN.RRR3".  SQLSTATE=42846
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 version 10.1 fix pack 3                       * 
****************************************************************
Local-Fix:
Drop and recreate the distinct type
verfügbare FixPacks:
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Lösung
First fixed in DB2 version 10.1 fix pack 3
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
13.03.2013
07.10.2013
07.10.2013
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.1.0.3 FixList
10.1.0.3 FixList