Subject Re: [firebird-support] Versioning and Row Lock
Author Guido Klapperich
> When a transaction inserts, updates, or deletes a record, it creates
> a record version with its transaction id in the header. When another
> transaction attempts to update or delete the record, it checks the
> transaction id in the header of the newest record version. If that
> transaction is active (in the case of read committed) or was active
> when the current translation started (in the case of snapshot or
> concurrency transactions) the operation fails with a deadlock - update
> conflict error.
>

Then I totally misunderstood versioning. Let's assume, there is a record
and Transaction 1 updates the record, but does not commit yet. Then
Transaction 2 starts and also wants to update that record. So it gets a
new version of the record. Now Transaction 1 commits and then
Transaction 2 commits. So there is no deadlock and Transaction 2 wins,
which means, the changes of Transaction 2 are the latest one. Is the
scenario I described wrong?

Regards

Guido