The correct way to fix this remove() problem would be to give a valid connection to remove (and close) methods.
The question can be asked to which user does this connection belong to?

But that same question can also be asked about the init method of a trigger that does already get a connection. Now trigger is initialized with a connection that has the privileges of the first user who just happens to cause the initialization of the trigger. This might be someone selecting innocently from a table (and thus causes the initialization).

Ideally connection of the trigger would have the privileges of the creator of the trigger.
But that is a discussion for another time.

- rami

On 27.5.2010 11:58, Rami Ojares wrote:
On 27.5.2010 2:11, Kerry Sainsbury wrote:
>What do you mean by "removing a trigger". From my reading of the documentation <http://www.h2database.com/html/features.html#triggers>your trigger should be handed a connection object, so why do you need to create your own?

When the trigger is dropped remove() method of the trigger is called.
But there is no connection object given as that method's argument

> umm. are you asking the db engine to connect to itself from inside a trigger?

I am trying to do additional cleanup whenever a trigger is removed.
I can not cleanup if I don't have a connection to the database.
So yes.

- rami

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to