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 | |
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 | |
10.5.0.2 |