[
https://issues.apache.org/jira/browse/DERBY-5591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273586#comment-13273586
]
Kim Haase commented on DERBY-5591:
----------------------------------
Thanks, Dag! I think we say in the REVOKE statement topic that "This applies
even if there are other permissions available that might have saved the day",
or words to that effect.
Would it be clearer to draw out REVOKE and DROP ROLE into two separate
sentences, like this?
"...Also, if you use a REVOKE statement to revoke privileges on objects that a
view depends on, the view will be dropped. Similarly, if you use a DROP ROLE
statement to drop a role that has privileges on objects that a view depends on,
the view will be dropped."
That seems to be the case in the following variation on your script:
jdench 158 =>java -jar
/export/home/chaase/javadbmore/codetrunk/trunk/jars/insane/derbyrun.jar ij
ij version 10.9
ij> connect 'jdbc:derby:wombat;create=true;user=dag;password=wanvik' as c1;
ij> call syscs_util.syscs_create_user('DAG', 'wanvik');
0 rows inserted/updated/deleted
ij> call syscs_util.syscs_create_user('DONALD', 'duck');
0 rows inserted/updated/deleted
ij> call
syscs_util.syscs_set_database_property('derby.database.sqlAuthorization',
'true');
0 rows inserted/updated/deleted
ij> disconnect c1;
ij> connect 'jdbc:derby:wombat;shutdown=true';
ERROR 08006: Database 'wombat' shutdown.
ij> connect 'jdbc:derby:wombat;user=dag;password=wanvik' as c1;
ij> create role quacker;
0 rows inserted/updated/deleted
ij> create table t ( i int);
0 rows inserted/updated/deleted
ij> insert into t values 1,2,3;
3 rows inserted/updated/deleted
ij> grant quacker to donald;
0 rows inserted/updated/deleted
ij> grant select on t to quacker;
0 rows inserted/updated/deleted
ij> connect 'jdbc:derby:wombat;user=donald;password=duck' as c2;
ij(C2)> create table dummy ( i int);
0 rows inserted/updated/deleted
ij(C2)> set role quacker;
0 rows inserted/updated/deleted
ij(C2)> create view myview as select i from dag.t;
0 rows inserted/updated/deleted
ij(C2)> select * from myview;
I
-----------
1
2
3
3 rows selected
ij(C2)> set connection c1;
ij(C1)> drop role quacker;
0 rows inserted/updated/deleted
WARNING 01501: The view MYVIEW has been dropped.
ij(C1)> set connection c2;
ij(C2)> select * from myview;
ERROR 42X05: Table/View 'MYVIEW' does not exist.
ij(C2)> exit;
> Imprecise wording in documentation in ref man on DROP VIEW
> ----------------------------------------------------------
>
> Key: DERBY-5591
> URL: https://issues.apache.org/jira/browse/DERBY-5591
> Project: Derby
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 10.8.2.2
> Reporter: Dag H. Wanvik
> Assignee: Kim Haase
> Priority: Minor
> Attachments: repro.sh
>
>
> This sentence is misleading: "Any statements referencing the view are
> invalidated on a DROP VIEW statement. DROP VIEW is disallowed if there are
> any views or open cursors dependent on the view. The view must be dropped
> before any objects that it is dependent on can be dropped."
> This isn't quite true. If a column is dropped with the CASCADE option, any
> dependent view(s) will be dropped. Are there other cases?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira