changeset 1939:c52365a4ce41

No need to ROLLBACK after a failed COMMIT
author Adam Chlipala <adam@chlipala.net>
date Wed, 25 Dec 2013 11:43:41 -0500
parents d02c1a0d8082
children 1484ba362062
files src/c/urweb.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/c/urweb.c	Mon Dec 23 15:59:17 2013 +0000
+++ b/src/c/urweb.c	Wed Dec 25 11:43:41 2013 -0500
@@ -3283,13 +3283,11 @@
       }
 
   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)