DB2 - Problembeschreibung
Problem IC84490 | Status: Geschlossen |
INCORRECT RESULT IF A NEW TABLE DATA-CHANGE-TABLE-REFERENCE OF A SIMPLE VIEW WITH A GENERATED ALWAYS AS EXPRESSION COLUM | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problembeschreibung: | |
Certain queries may return in correct results when they contain a NEW TABLE data-change-reference for an INSERT or UPDATE of a simple view. The view exposes a GENERATED ALWAYS AS EXPRESSION column from the base table and does not have any predicates In this case the value returned by the query for the GENERATED ALWAYS AS EXPRESSION column may be incorrect. The data stored in the table for the GENERATED ALWAYS AS EXPRESSION column is correct, and can be retrieved via a normal select column. An example is below CREATE TABLE T1 (X INT, Y INT, Z INT GENERATED ALWAYS AS (X+Y)); CREATE VIEW V1 AS SELECT * FROM T1; SELECT * FROM NEW TABLE (UPDATE V1 SET X = X+1); The value returned f from the query for column Z may be incorrect. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 version 10.1 Fix Pack 1. * **************************************************************** | |
Local-Fix: | |
1) Split the query into two parts, first to INSERT or UPDATE the data and a second to get the new values. 2) Add a simple predicate to the view definition. | |
verfügbare FixPacks: | |
DB2 Version 10.1 Fix Pack 1 for Linux, UNIX, and Windows | |
Lösung | |
The problem is first fixed in DB2 version 10.1 Fix Pack 1 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 14.06.2012 01.11.2012 01.11.2012 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
10.1.0.1 | |
10.5.0.1 |