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

LP Bug: 1412891 - Drop table cascade returns error 1389 if a dependent object has a delimited name

    XMLWordPrintableJSON

Details

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

    Description

      As shown in the following example, drop table cascade fails to handle a dependent view that has a delimited name. It returns error 1389 complaining that the view (without the double quotes) does not exist. This is a regression introduced in the v0118 build. It was not seen on the v0117 build.

      -----------------------------------------------------------------------

      Here is the entire script to reproduce this problem:

      create schema mytest;
      set schema mytest;

      create table mytable (a int);
      create view "myview" (a) as select a from mytable;
      select * from "myview";
      showddl "myview";
      drop table mytable cascade;

      drop view "myview";
      drop table mytable cascade;

      drop schema mytest cascade;

      -----------------------------------------------------------------------

      Here is the execution output:

      >>obey mytest2.sql;
      >>create schema mytest;

      — SQL operation complete.
      >>set schema mytest;

      — SQL operation complete.
      >>
      >>create table mytable (a int);

      — SQL operation complete.
      >>create view "myview" (a) as select a from mytable;

      — SQL operation complete.
      >>select * from "myview";

      — 0 row(s) selected.
      >>showddl "myview";

      CREATE VIEW TRAFODION.MYTEST."myview" (A) AS
      SELECT TRAFODION.MYTEST.MYTABLE.A FROM TRAFODION.MYTEST.MYTABLE ;

      — SQL operation complete.
      >>drop table mytable cascade;

          • ERROR[1389] Object MYVIEW does not exist in Trafodion.

      — SQL operation failed with errors.
      >>
      >>drop view "myview";

      — SQL operation complete.
      >>drop table mytable cascade;

      — SQL operation complete.
      >>
      >>drop schema mytest cascade;

      — SQL operation complete.

      Attachments

        Activity

          People

            cliffgray Cliff Gray
            WTsai Weishiun Tsai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: