comparison 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
comparison
equal deleted inserted replaced
1935:fda9d5af69e7 1936:6745eafff617
132 132
133 void uw_copy_client_data(void *dst, void *src) { 133 void uw_copy_client_data(void *dst, void *src) {
134 } 134 }
135 135
136 void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) { 136 void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) {
137 if (uw_get_app(ctx)->db_begin(ctx)) 137 uw_ensure_transaction(ctx);
138 uw_error(ctx, FATAL, "Error running SQL BEGIN");
139 uw_get_app(ctx)->expunger(ctx, cli); 138 uw_get_app(ctx)->expunger(ctx, cli);
140 uw_commit(ctx); 139 uw_commit(ctx);
141 } 140 }
142 141
143 void uw_post_expunge(uw_context ctx, void *data) { 142 void uw_post_expunge(uw_context ctx, void *data) {