diff options
author | Adam Chlipala <adam@chlipala.net> | 2013-12-25 11:43:41 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2013-12-25 11:43:41 -0500 |
commit | 718185cc88b56e376d4fe4f973accaa6d7c33675 (patch) | |
tree | 27832a71c92836b4ce9ed3a43c0e1c0eff7bba4a | |
parent | fac05ae0a6d7d080436c953d2085e137d75c5796 (diff) |
No need to ROLLBACK after a failed COMMIT
-rw-r--r-- | src/c/urweb.c | 6 |
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) |