On 23/05/2018 08:51, Vlad Khorsun via Firebird-devel wrote:
> 23.05.2018 13:40, Adriano dos Santos Fernandes wrote:
>> On 23/05/2018 06:48, Dimitry Sibiryakov wrote:
>>>
>>>    In this case I guess there must be two triggers: BEFORE RESET and
>>> AFTER RESET.
>>
>> I like this more than the other approaches.
>
>   I strongly suggest to consider existing DISCONNECT\CONNECT triggers
> also. I think, most of the code will be the same in both set of events
> therefore it is very questionable if we need another pair of triggers.
>

Yes, but for me it seems as a hack. User can always do a single SP and
call it on both triggers.

I have an idea with I think is good.

What if RESET resets not to the initial (before ON CONNECT) state, but
to the state present after ON CONNECT?

So ON CONNECT can define context variables that is not reset.

And if user wants to reset them (which I think will not be a common
thing), the AFTER RESET trigger may do it manually.


>> Also, a RESET may cause problems to an database application, so an
>> exception in BEFORE RESET should be possible to abort the reset.
>
>   Connection pool will close external connection in this case, correct ?
> I.e. any error on session reset (except of syntax error, of course)
> will close such a session.
>
Yes.


Adriano


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to