comparison src/mysql.sml @ 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 2f33d9a51765
children 0992323fa264
comparison
equal deleted inserted replaced
1935:fda9d5af69e7 1936:6745eafff617
575 newline, 575 newline,
576 string "}", 576 string "}",
577 newline, 577 newline,
578 newline, 578 newline,
579 579
580 string "static int uw_db_begin(uw_context ctx) {", 580 string "static int uw_db_begin(uw_context ctx, int could_write) {",
581 newline, 581 newline,
582 string "uw_conn *conn = uw_get_db(ctx);", 582 string "uw_conn *conn = uw_get_db(ctx);",
583 newline, 583 newline,
584 newline, 584 newline,
585 string "return mysql_query(conn->conn, \"SET TRANSACTION ISOLATION LEVEL SERIALIZABLE\")", 585 string "return mysql_query(conn->conn, \"SET TRANSACTION ISOLATION LEVEL SERIALIZABLE\")",