db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5591) Imprecise wording in documentation in ref man on DROP VIEW
Date Fri, 11 May 2012 16:38:50 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273407#comment-13273407
] 

Dag H. Wanvik commented on DERBY-5591:
--------------------------------------

Thanks, Kim. I found permissions revocation doesn't only affect the roles actions mention,
but also plain revoke, cf. the repro attched ("repro.sh"):
Running it gives this result:



$ bash repro.sh
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 table t ( i int);
0 rows inserted/updated/deleted
ij> insert into t values 1,2,3;
3 rows inserted/updated/deleted
ij> grant select on t to donald;
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)> 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)> revoke select on t from donald;
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

        

Mime
View raw message