diff src/c/urweb.c @ 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 9f3597979e98
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)