Subject Re: Deadlock @ Update
Author mikcaau
--- In firebird-support@yahoogroups.com, Matthias Hanft <mh@...> wrote:
>
> Hello,
>
> I have a FB database where one record (always the same)
> is updated very often (currently once per minute for
> testing purposes; later perhaps once an hour). The SQL
> command goes like this:
>
> update UPDATES
> set DATETIME=:DATETIME, FILENAME=:FILENAME,
> DATE_FROM=:DATE_FROM, DATE_TO=:DATE_TO
> where ID=:ID;
>
> (This is surrounded by StartTransaction and Commit.)
>
> In 99,973% :-) this command succeeds. The rest raises
> an exception "deadlock update conflicts with concurrent
> update".
>
<snip>
>
Matt,
You have to handle this in your application. Your app needs to detect
the error, wait a while than try again.
You would probably set a max tries before it gives up.
Mick