Drop table cascade returns error 1389 if a dependent object has a delimited name

Bug #1412891 reported by Weishiun Tsai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Released
High
Cliff Gray

Bug 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.

Tags: sql-cmu
Cliff Gray (cliff-gray)
Changed in trafodion:
assignee: nobody → Cliff Gray (cliff-gray)
status: New → In Progress
Cliff Gray (cliff-gray)
Changed in trafodion:
milestone: r1.0 → r1.1
Revision history for this message
Cliff Gray (cliff-gray) wrote :

Fix is ready, will deliver when r1.0 is complete.

Revision history for this message
Cliff Gray (cliff-gray) wrote :

Fix delivered in 1082.

Changed in trafodion:
status: In Progress → Fix Committed
Revision history for this message
Weishiun Tsai (wei-shiun-tsai) wrote :

Verified on the v0210 build installed on a workstation. This problem has been fixed:

>>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;

--- SQL operation complete.
>>
>>drop view "myview";

*** ERROR[1389] Object TRAFODION.MYTEST."myview" does not exist in Trafodion.

--- SQL operation failed with errors.
>>drop table mytable cascade;

*** ERROR[1389] Object TRAFODION.MYTEST.MYTABLE does not exist in Trafodion.

--- SQL operation failed with errors.
>>
>>drop schema mytest cascade;

--- SQL operation complete.

Changed in trafodion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.