Subject | Re: Deadlock |
---|---|
Author | Adam |
Post date | 2006-02-10T11:01:39Z |
> I'm using Firebird-1.5.2.4731 an IBX 7.08 drivers in a Delphiapplication.
This is irrelevant to your problem.
>with concurrent update.
> Occasionally I get a deadlock situation with the following message:
>
> Lock conflict on no wait transaction. Deadlock. Update conflicts
> SQL Code: -901Here is an easier way to duplicate it. Open two iSQL windows connected
> IB Error Number: 33 55 44 345
>
> What is causing it and how do I avoid it?
>
to the same database, and run an identical update query in both
windows without committing, voila.
This is caused because the transactions is trying to update or delete
a record that has already been updated or deleted by a transaction
that was not committed before your transaction started. It is an
exception you should allow for and expect to happen if you have
multiple transactions potentially interested in the same record.
By the way, the update or delete can be explicit or implicit. In other
words, you may only insert a record into a table, but if that table
has an insert trigger that updates or deletes a record, then this
could also cause the conflict.
Adam