Subject Re: [firebird-support] A question about "with lock"
Author Ivan Prenosil
> 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