Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-936

LP Bug: 1413758 - Drop table cascade did not drop nested view

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.1 (pre-incubation)
    • sql-cmu
    • None

    Description

      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.

      Attachments

        Activity

          People

            cliffgray Cliff Gray
            paul.low Paul Low
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: