Subject Re: [firebird-php] Re: Proper transaction & deadlock handling
Author masotti

Il 23/11/2016 10:38, max@... [firebird-php] ha scritto:

> I've not tested this, but at a guess if a 1000 records were to be
> updated and the r eturn value was 999 this might inficate that one
> record had a deadlock and couldn't be updated, but 999 could. So
> perhaps you could commit the 999 and retry the 1 failure, which might be
> more efficient than rolling back all 1000 updates and retrying the whole
> lot. (As I say, just a guess following the same "logic".).

Perhaps it's not possibile to commit the transaction in this case: the
deadlocked record would refuse and commit return FALSE. Transaction
atomicity must be respected.

AFAIK rollback is the only chance, and happens automagically at end of
script execution.