You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:19:08 UTC

[jira] [Created] (TRAFODION-936) LP Bug: 1413758 - Drop table cascade did not drop nested view

Alice Chen created TRAFODION-936:
------------------------------------

             Summary: LP Bug: 1413758 - Drop table cascade did not drop nested view
                 Key: TRAFODION-936
                 URL: https://issues.apache.org/jira/browse/TRAFODION-936
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmu
            Reporter: Paul Low
            Assignee: Cliff Gray
            Priority: Critical
             Fix For: 1.1 (pre-incubation)


A view selects from the view that selects from a table.  When a 'drop table cascade' command is executed, both views are expected to be dropped.  The view that selects from the view is not dropped.  The object remains.

User create schema, table, view.  User creates second view on the first view.  User drops table with cascade option, but the second view is not dropped.

Log:

SQL>create schema sch1; 

--- SQL operation complete.

SQL>set schema sch1;

--- SQL operation complete.

SQL>create table tab1(a int, b int);            

--- SQL operation complete.

SQL>create view view1 as select * from tab1;

--- SQL operation complete.

SQL>create view view2 as select * from view1;

--- SQL operation complete.

SQL>drop table tab1 cascade;

--- SQL operation complete.

SQL>get tables;

--- SQL operation complete.

SQL>drop schema sch1;

*** ERROR[1028] The schema must be empty.  It contains at least one object VIEW2. 

SQL>select * from view2;

*** ERROR[4082] Object TRAFODION.SCH1.VIEW1 does not exist or is inaccessible. 

SQL>drop schema sch1 cascade;

--- SQL operation complete.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)