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 05:12:11 GMT
On Sat, 2006-04-29 at 10:02 -0400, Chris Darroch wrote:

> #define APR_DBD_TRANS_COMMIT_ON_SUCCESS	0
> #define APR_DBD_TRANS_COMMIT		1
> #define APR_DBD_TRANS_ROLLBACK		2
> #define APR_DBD_TRANS_DEFAULT		APR_DBD_TRANS_COMMIT_ON_SUCCESS

OK, I started working on this (skeleton of of the patch is ready), but
before I go any further, could you give me a hint on the semantics of
the above. What I'm not getting is APR_DBD_TRANS_COMMIT v.
APR_DBD_TRANS_COMMIT_ON_SUCCESS. Isn't that the same? I mean, you can't
forcefully commit anything - the database won't take it. So, there is no
point trying the commit if previous errors within the transaction show
that the transaction is going to fail - the only thing that can be done
is rollback. In other words, commit is only commit on success.

So, I think we should just have:

#define APR_DBD_TRANS_COMMIT   0
#define APR_DBD_TRANS_ROLLBACK 1

Or is there something I missed here...

-- 
Bojan


Mime
View raw message