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

NO ERROR IS RETURNED WHEN INSERTING NULL INTO A COLUMN OF A NICKNAME THAT
DOES NOT ALLOW NULL VALUE

Produkt:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problembeschreibung:
When we insert "NULL", which is the output of a UDF,   into a 
column of a nickname that does not allow NULL values, you may 
not receive a SQL0407N error as expected, but actaully the 
insert operation is actaully failed, 0 rows is inserted. 
 
The issue is easy to recreate: 
 
SET PASSTHRU SQLSERVER 
CREATE TABLE [dbo].[t2]([c1_notnull] [datetime] NOT 
NULL,[c2_null] [datetime] NULL) 
SET PASSTHRU RESET 
 
CREATE NICKNAME T2 FOR SQLSERVER.dbo.t2 
 
CREATE OR REPLACE FUNCTION STRINGTODATE 
( 
   STR VARCHAR(23) 
) 
RETURNS DATE 
SPECIFIC STRINGTODATE 
LANGUAGE SQL 
DETERMINISTIC 
NO EXTERNAL ACTION 
CONTAINS SQL 
BEGIN 
   DECLARE rdate  DATE; 
   --DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET rdate = null; 
   SET rdate = DATE(STR); 
   RETURN rdate; 
END 
 
db2 => INSERT INTO T2(c1_notnull,c2_null) SELECT 
STRINGTODATE(NULL),DATE('2012-06-25 15:00:00.000') FROM 
SYSIBM.SYSDUMMY1 
DB20000I  The SQL command completed successfully. 
 
NOTE: It said insert successfully but actually failed!
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* The users are inserting "NULL", which is the output of a     * 
* UDF,   into a column of a nickname that does not allow NULL  * 
* values.                                                      * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to InfoSphere Federation Server v101fp2 or later.    * 
****************************************************************
Local-Fix:
verfügbare FixPacks:
DB2 Version 10.1 Fix Pack 2 for Linux, UNIX, and Windows
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
The problem is first fixed at v101fp2.
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
17.11.2012
31.12.2012
31.12.2012
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.1.0.2 FixList
10.5.0.2 FixList