apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: [PATCH]: Introduce apr_dbd_transaction_rollback
Date Sun, 30 Apr 2006 23:29:56 GMT
Quoting Ronen Mizrahi <ronen@tversity.com>:

> Jut a small comment, if you do go ahead with the flag and not add a
> rollback funciton (which I think is much cleaner) then please be aware
> that the caller will need to know if the result was successful commit,
> successful rollback, or some other failure.

Yes, that would most definitely be the case. That's because the return  
codes of apr_dbd_transaction_end function are local in their effects.  
They only signal what happened within the function, not what happened  
to the transaction.

So, here are the relevant cases:

Mode COMMIT:

- transaction status bad:  execute rollback, success on successful rollback
- transaction status good: execute commit, success on successful commit

Mode ROLLBACK:

- execute rollback, success on successful rollback

-- 
Bojan

Mime
View raw message