comparison 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
comparison
equal deleted inserted replaced
1935:fda9d5af69e7 1936:6745eafff617
436 436
437 void uw_copy_client_data(void *dst, void *src) { 437 void uw_copy_client_data(void *dst, void *src) {
438 } 438 }
439 439
440 void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) { 440 void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) {
441 if (uw_get_app(ctx)->db_begin(ctx)) 441 uw_ensure_transaction(ctx);
442 uw_error(ctx, FATAL, "Error running SQL BEGIN");
443 uw_get_app(ctx)->expunger(ctx, cli); 442 uw_get_app(ctx)->expunger(ctx, cli);
444 uw_commit(ctx); 443 uw_commit(ctx);
445 } 444 }
446 445
447 void uw_post_expunge(uw_context ctx, void *data) { 446 void uw_post_expunge(uw_context ctx, void *data) {