Subject | Re: [firebird-support] A question about "with lock" |
---|---|
Author | Ivan Prenosil |
Post date | 2005-03-02T16:05:14Z |
> Hi IvanIs not it easier to just try it yourself instead of investigate
> i understand your answer.
> but Helen's answer is different from your answer.
> Helen said "This form of pessimistic locking does not affect your triggers"
>
> please check the mail archive.
> what is the truth
in archives/books/documentation/...?
It will take just two minutes to download and install Firebird,
another two minutes to get ultimate answer to "with lock"'s behaviour.
:-)
Ivan
> ----- Original Message -----
> From: "Ivan Prenosil" <Ivan.Prenosil@...>
> To: <firebird-support@yahoogroups.com>
> Sent: Wednesday, March 02, 2005 2:41 PM
> Subject: Re: [firebird-support] A question about "with lock"
>
>
>>
>>> if i read records with "with lock" clause, if there are before/update
>>> triggers for table, are they fire
>>>
>>> i read the record like this
>>>
>>> select * from table
>>> where id = 5 with lock
>>>
>>> and there is an before update trigger of this table
>>> and there is an after update trigger of this table
>>>
>>> are theese triggers is fire with lock clause
>>
>> No triggers will be fired. "with lock" was introduced to:
>> * allow locking of records without firing triggers
>> (otherwise dummy update would be sufficient)
>> * lock row and read its contents in one operation
>>
>>> how firebird server lock this records
>>
>> The same way as dummy update, except that triggers
>> will not fire.
>>
>> Ivan