DB2 - Problembeschreibung
Problem IC67243 | Status: Geschlossen |
CREATION OF SUBVIEW SUCCEEDS BUT SHOULD FAIL WITH SQLCODE SQL20053 REASON CODE 2, SQLSTATE 428EA | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - 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.7 Fix Pack 2 * **************************************************************** | |
Local-Fix: | |
verfügbare FixPacks: | |
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows | |
Lösung | |
Problem was first fixed in DB2 Version 9.7 Fix Pack 2 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Bug-Verfolgung | |
Vorgänger : APAR is sysrouted TO one or more of the following: IC67247 Nachfolger : | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 16.03.2010 08.04.2010 08.04.2010 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7.FP2 | |
Problem behoben lt. FixList in der Version | |
9.7.0.2 |