DB2 - Problembeschreibung
Problem IC67247 | Status: Geschlossen |
CREATION OF SUBVIEW SUCCEEDS BUT SHOULD FAIL WITH SQLCODE SQL20053 REASON CODE 2, SQLSTATE 428EA | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problembeschreibung: | |
For a hierarchy of views and subviews: Let BR1 and BR2 be any branches that appear in the definitions of views in the hierarchy. Let T1 be the underlying table or view of BR1, and let T2 be the underlying table or view of BR2. Then: * If T1 and T2 are not in the same hierarchy, then the root view in the view hierarchy must specify the UNCHECKED option for its OID column. * If T1 and T2 are in the same hierarchy, then BR1 and BR2 must contain predicates or ONLY-clauses that are sufficient to guarantee that their row-sets are disjoint. The second requirement is not always correctly enforced, this can happen if there is a predicate that compares two different columns. For example: CREATE VIEW v1 OF vt1 MODE DB2SQL (REF IS oid USER GENERATED) AS SELECT vt1(VARCHAR(oid)), 1 FROM legacy WHERE c1 = 40; CREATE VIEW v2 OF vt2 MODE DB2SQL UNDER v1 INHERIT SELECT PRIVILEGES EXTEND AS SELECT 2 FROM legacy WHERE c1 = 30 or c1 = c2; The creation of v2 should be blocked with SQLSTATE 428EA but it is not. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * For a hierarchy of views and subviews: Let BR1 and BR2 be * * any * * branches that appear in the definitions of views in the * * * * hierarchy. Let T1 be the underlying table or view of BR1, * * and * * let T2 be the underlying table or view of BR2. Then: * * * * * * * * * If T1 and T2 are not in the same hierarchy, then the * * root * * view in the view hierarchy must specify the UNCHECKED option * * for * * its OID column. * * * * * If T1 and T2 are in the same hierarchy, then BR1 and * * BR2 * * must contain predicates or ONLY-clauses that are sufficient * * to * * guarantee that their row-sets are disjoint. * * * * * * * * The second requirement is not always correctly enforced, * * this * * can happen if there is a predicate that compares two * * different * * columns. For example: * * * * * * * * CREATE VIEW v1 OF vt1 MODE DB2SQL (REF IS oid USER * * GENERATED) * * AS SELECT vt1(VARCHAR(oid)), 1 FROM legacy * * * * WHERE c1 = 40; * * * * * * * * CREATE VIEW v2 OF vt2 MODE DB2SQL UNDER v1 INHERIT SELECT * * * * PRIVILEGES * * * * EXTEND AS SELECT 2 FROM legacy * * * * WHERE c1 = 30 or c1 = c2; * * * * * * * * The creation of v2 should be blocked with SQLSTATE 428EA but * * it * * is not. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 version 9.5 Fix Pack 6 * **************************************************************** | |
Local-Fix: | |
verfügbare FixPacks: | |
DB2 Version 9.5 Fix Pack 6a for Linux, UNIX, and Windows | |
Lösung | |
First fixed in DB2 version 9.5 Fix Pack 6 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Bug-Verfolgung | |
Vorgänger : APAR is sysrouted TO one or more of the following: IC67263 Nachfolger : | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 16.03.2010 25.05.2010 25.05.2010 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.5.FP6 | |
Problem behoben lt. FixList in der Version |