Drop schema cascade fails then succeeds

Bug #1437474 reported by Paul Low on 2015-03-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Released
High
Cliff Gray

Bug Description

The first drop schema cascade command returns error after waiting for about 30 seconds, but the second drop schema cascade command returns success immediately.
It seems that the library and function must be part of the sequence below in order to reproduce the error, because when they were left out, no error returned.

SQL>drop schema schema1 cascade;

*** ERROR[1069] Schema TRAFODION.SCHEMA1 could not be dropped.

See log of sequence below:

SQL>create schema schema1;

--- SQL operation complete.

SQL>grant COMPONENT privilege "CREATE" on sql_operations to username1;

--- SQL operation complete.

SQL>set schema schema1;

--- SQL operation complete.

SQL>create library sec_udflib1 file '/home/trafodion/secudf.dll';

--- SQL operation complete.

SQL>create function myudf (INVAL int)
            returns (OUTVAL int)
             language c
                parameter style sql
                external name 'myudf'
                library sec_udflib1
                deterministic
                state area size 1024
                allow any parallelism
                no sql;
+>+>+>+>+>+>+>
--- SQL operation complete.

SQL>grant execute on function myudf to username1;

--- SQL operation complete.

SQL>connect username1/password1;
Connected to Trafodion

SQL>set schema schema1;

--- SQL operation complete.

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

--- SQL operation complete.

SQL>insert into mytable values (1,1);

--- 1 row(s) inserted.

SQL>create view myview as select myudf(a) from mytable;

--- SQL operation complete.

SQL>create view myview2 as select * from mytable;

--- SQL operation complete.

SQL>select * from myview;

*** ERROR[4481] The user does not have SELECT privilege on table or view TRAFODION.SCHEMA1.MYVIEW.

SQL>select * from myview2;

*** ERROR[4481] The user does not have SELECT privilege on table or view TRAFODION.SCHEMA1.MYVIEW2.

SQL>select * from mytable;

A B
----------- -----------
          1 1

--- 1 row(s) selected.

SQL>connect db__rootuser/password1;
Connected to Trafodion

SQL>drop schema schema1 cascade;

*** ERROR[1069] Schema TRAFODION.SCHEMA1 could not be dropped.

SQL>drop schema schema1 cascade;

--- SQL operation complete.

Weishiun Tsai (wei-shiun-tsai) wrote :

I need to bump this one to High. This problem is causing a lot of headache for the SQL regression run. In the recent SQL regression run, we saw 19 occurrences of such error. It left a trail of schemas that did not get dropped and we had to go in to clean them up manually. The rate of this this error is quite alarming.

-bash-4.1$ grep ERROR */*.log | grep 1069 | grep Schema | wc -l
19

Changed in trafodion:
importance: Medium → High
milestone: none → r1.1
Cliff Gray (cliff-gray) on 2015-03-31
Changed in trafodion:
status: New → In Progress
Cliff Gray (cliff-gray) wrote :

Fix delivered in change 1425.

Changed in trafodion:
status: In Progress → Fix Committed
Paul Low (paul-low-x) wrote :

Verified on 0403 build

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

Other bug subscribers