MySQL Forums
Forum List  »  Triggers

Trigger owner vs session owner
Posted by: RW Shore
Date: September 02, 2005 07:44PM

1. When a trigger fires, does it run with the grants of the current session owner or with those of the trigger owner (the user that executed the create-trigger statement)? It seems to me that I read some documentation about this, but I'll be darned if I can find it now (suggesting that an addition to section 19 of the documentation may be in order). I'd like to be able to have a trigger update tables that the user can't simply do an update against; that is, I'd like the trigger to run with the grants associated with the trigger owner rather than (in addition to?) those of the session owner.

2. I know that when executed inside a trigger, the USER() and CURRENT_USER() functions refer to the session owner, not the trigger owner - I tested this much. Is there a function that tells me the trigger owner rather than the session owner?

Options: ReplyQuote

Written By
Trigger owner vs session owner
September 02, 2005 07:44PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.