You are not logged in.
I found very unexpected behavior: if I stop server all uncommited transaction is COMMITed (tested for Oracle). I expect rollback in this case. This is because of
procedure TSQLDBOracleConnection.Disconnect;
...
Check(SessionEnd(fContext,fError,fSession,OCI_DEFAULT),fError,false,sllError); <---- The transaction specified by the service context is implicitly committed [url]http://docs.oracle.com/cd/A97630_01/appdev.920/a96584/oci15r14.htm[/url]
It seems for MS SQL I have to get SQLSTATE 25000 (Invalid transaction state) in similar situation.
My propose is to check transaction state and rollback uncommited transaction in procedure TSQLDBConnection.Disconnect; to solve this problem.
If we decide not do it on connection level, I can rollback manually in OnHttpThreadTerminate, but I think default behavior for disconnecting must be Rollback.
In other library sometimes present parameter Connection.RollbackOnDisconnect: boolean;
Which option we choose?
Last edited by mpv (2013-07-05 13:15:21)
Offline
created ticket http://synopse.info/fossil/tktview/dc64 … 080dec862d
Offline