Subject | Re: [firebird-support] handling lock conflicts within a stored procedure |
---|---|
Author | Ann W. Harrison |
Post date | 2006-09-12T17:15:25Z |
Stan wrote:
as the outer transaction, so asking the question over and over
is going to get the same answer for snapshot/concurrency
transactions. If you run that procedure in read-committed
mode, it will eventually see the conflicting record and the
new data when the second transaction commits. On the other
hand, it will waste a lot of CPU testing over and over until
the commit happens.
So generally, I say no, that's not a good way to hand lock
conflicts.
Regards,
Ann
>The nested transactions have the same snapshot of the database
> According to The great Firebird Book, try/catch blocks
> within a stored procedure act as "nested" transactions.
>
as the outer transaction, so asking the question over and over
is going to get the same answer for snapshot/concurrency
transactions. If you run that procedure in read-committed
mode, it will eventually see the conflicting record and the
new data when the second transaction commits. On the other
hand, it will waste a lot of CPU testing over and over until
the commit happens.
So generally, I say no, that's not a good way to hand lock
conflicts.
Regards,
Ann