[ http://issues.apache.org/jira/browse/DERBY-1582?page=all ]
Deepa Remesh updated DERBY-1582:
--------------------------------
Attachment: d1582_v2.diff
d1582_v2.status
Attaching a revised patch 'd1582_v2.diff' which raises a warning when no
privileges are revoked by the revoke statement for a grantee. This patch
handles the case when multiple grantees are specified and raises a warning for
each grantee.
The warning raised is:
"WARNING 01006: Privilege not revoked from <grantee>."
With the patch, we will be getting the same warning message in both these
scenarios:
1) When no matching privilege is found
2) When a privilege is found but it cannot be revoked (cases like revoke
privileges from database owner, self privilege revocation, revoke privilege
from object owner)
Is this okay? Or do we need to differentiate the warning messages in these
cases?
The patch does not raise warnings in the following cases. I am trying to handle
these cases plus add few more tests in a separate patch:
* When multiple privilege actions on a table are revoked from a user and the
user does not have privilege for one of the actions on the table
create table t1 (c11 int, c12 int);
grant select, insert on t1 to deepa;
revoke select,insert,update on t1 from deepa;
The above revoke statement should raise a warning as user does not have update
privilege on the table.
* When multiple columns are specified in the column list and the user does not
have the privilege on one of the columns.
grant select(c11) on t1 to deepa;
revoke select(c11,c12) on t1 from deepa;
The above revoke statement should raise a warning as user does not have select
privilege on column c12.
With this patch, I ran grant/revoke tests. I had run derbyall earlier but have
made small changes after that and will re-run it tonight. Please take a look at
this and provide feedback. Thanks.
> REVOKE statement does not generate a warning when no privileges are revoked.
> ----------------------------------------------------------------------------
>
> Key: DERBY-1582
> URL: http://issues.apache.org/jira/browse/DERBY-1582
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.2.1.0
> Reporter: Daniel John Debrunner
> Assigned To: Deepa Remesh
> Attachments: d1582_v1.diff, d1582_v1.status, d1582_v2.diff,
> d1582_v2.status
>
>
> SQL 2003 standard, section 12.7 <revoke statement>, item 17 under general
> rules indicates the statement completes with the condition 'warning ?
> privilege not revoked.' when no matching privilege is revoked.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira