db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1539) As per the functional spec attached to DERBY-1330, a trigger should be dropped when a privilege required by the trigger is revoked.
Date Tue, 25 Jul 2006 22:58:14 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1539?page=comments#action_12423480 ] 
            
Daniel John Debrunner commented on DERBY-1539:
----------------------------------------------

The code in the patch seems generally ok, though it's not clear why you stopped resetting
the UUID here and with changes below may still be required:

             	//grant/revoke privilege didn't change anything and hence just
-            	//return after resetting the uuid in the permission descriptor
-            	perm.setUUID(null);
+            	//return
                 return;   

As an aside, that  diff confused me for a while, I thought you were adding a commented out
return statement, eventually I figured out it was a modified comment :-)

However two issues:

1) the call to invalidateFor() in the DataDictionaryImpl is not correct, it needs to be moved
higher, to the revoke constanct action that is driving the REVOKE. Most of the other existing
calls to invalidateFor() are from the constant actions, and none are from within the data
dictionary. Think of the data dictionary as the glue code between objects and the stored form,
the system catalogs. Thus if one had a pure in-memory data dictionary one wouldn't want to
duplicate the logic relating to revoking objects in it, much better to have it in a single
place at the higher level.

2) The actual drop of the trigger descriptor needs to be in the makeInvalid call, not the
prepareToInvalidate call. See the earlier discussion on derby-dev.
  [As another aside, if code has an existing switch statement you should add to the switch,
not ad dan extra if statement, like your code in prepareToInvalidate]

> As per the functional spec attached to DERBY-1330, a trigger should be dropped when a
privilege required by the trigger is revoked.
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1539
>                 URL: http://issues.apache.org/jira/browse/DERBY-1539
>             Project: Derby
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 10.2.0.0
>            Reporter: Mamta A. Satoor
>         Assigned To: Mamta A. Satoor
>             Fix For: 10.2.0.0
>
>         Attachments: DERBY1539V1hashCodeEqualsDiff.txt, DERBY1539V1hashCodeEqualsStat.txt,
DERBY1539V2diffDropTriggerOnRevoke.txt, DERBY1539V2statDropTriggerOnRevoke.txt
>
>
> A trigger tracks its privileges requirements using Derby's Dependency Manager. If any
one of those required privileges are revoked, the trigger should be dropped automatically.

> I am just creating a new jira entry here so it is easier to track sub items of DERBY-1330.
Will link this Jira entry to DERBY-1330.

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

        

Mime
View raw message