diff src/c/cgi.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 0da75c01a993
children d02c1a0d8082
line wrap: on
line diff
--- a/src/c/cgi.c	Thu Dec 12 10:31:34 2013 -0500
+++ b/src/c/cgi.c	Thu Dec 12 17:42:48 2013 -0500
@@ -134,8 +134,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);
 }