diff src/c/http.c @ 1936:6745eafff617

Start SQL transactions as read-only when possible, based on conservative program analysis
author Adam Chlipala <adam@chlipala.net>
date Thu, 12 Dec 2013 17:42:48 -0500
parents 420d129c4174
children 94f9570671f0
line wrap: on
line diff
--- a/src/c/http.c	Thu Dec 12 10:31:34 2013 -0500
+++ b/src/c/http.c	Thu Dec 12 17:42:48 2013 -0500
@@ -438,8 +438,7 @@
 }
 
 void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) {
-  if (uw_get_app(ctx)->db_begin(ctx))
-    uw_error(ctx, FATAL, "Error running SQL BEGIN");
+  uw_ensure_transaction(ctx);
   uw_get_app(ctx)->expunger(ctx, cli);
   uw_commit(ctx);
 }