Pessimistic lock & rollback to savepoint = loosing changes??
Posted: Tue 27 Sep 2011 00:00
Hi,
Delphi 2010 UniDAC (3.50.0.13) with PostgreSQL (SecureBridge 3.00.0.2). I have two tables, A and B in a master detail relationship. I'm using pessimistic locking with a TUniQuery on table A and I'm not using CachedUpdates. I start a transaction, then edit the master record A and add a record to table B using another TUniQuery. When done I post the records and commit the transaction. The events I observe (with dbMonitor) are:
Start:
Savepoint LOCK_qTableA
Select * from TableA
Insert into B
Rollback to savepoint LOCK_qTableA (???????)
Commit
I guess 'm not surprised that this confirms my observation of loosing the updates.
Can you please explain why UniDAC is executing a Rollback to savepoint?
kind regards,
Jan
Delphi 2010 UniDAC (3.50.0.13) with PostgreSQL (SecureBridge 3.00.0.2). I have two tables, A and B in a master detail relationship. I'm using pessimistic locking with a TUniQuery on table A and I'm not using CachedUpdates. I start a transaction, then edit the master record A and add a record to table B using another TUniQuery. When done I post the records and commit the transaction. The events I observe (with dbMonitor) are:
Start:
Savepoint LOCK_qTableA
Select * from TableA
Insert into B
Rollback to savepoint LOCK_qTableA (???????)
Commit
I guess 'm not surprised that this confirms my observation of loosing the updates.
Can you please explain why UniDAC is executing a Rollback to savepoint?
kind regards,
Jan