summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2013-12-25 11:43:41 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2013-12-25 11:43:41 -0500
commitf42ed389d1b67749ff441c6389f7fcf14237c211 (patch)
tree27832a71c92836b4ce9ed3a43c0e1c0eff7bba4a /src/c
parent76b26fec5a3b521a084491d77d6c9e1e28ab603c (diff)
No need to ROLLBACK after a failed COMMIT
Diffstat (limited to 'src/c')
-rw-r--r--src/c/urweb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 57f57694..ab6e5b1f 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -3283,13 +3283,11 @@ int uw_commit(uw_context ctx) {
}
if (ctx->transaction_started) {
- int code =ctx->app->db_commit(ctx);
+ int code = ctx->app->db_commit(ctx);
if (code) {
- if (code == -1) {
- uw_rollback(ctx, 1);
+ if (code == -1)
return 1;
- }
for (i = ctx->used_transactionals-1; i >= 0; --i)
if (ctx->transactionals[i].free)