Diff

util/sql.lua @ 6805:c37633feaece

util.sql: Log when transactions begin
author Kim Alvefur <zash@zash.se>
date Sun, 30 Aug 2015 13:45:36 +0200
parent 6777:5de6b93d0190
child 6806:f824057189ed
line wrap: on
line diff
--- a/util/sql.lua	Thu Aug 27 12:17:12 2015 +0200
+++ b/util/sql.lua	Sun Aug 30 13:45:36 2015 +0200
@@ -180,6 +180,7 @@
 	--assert(not self.__transaction, "Recursive transactions not allowed");
 	local args, n_args = {...}, select("#", ...);
 	local function f() return func(unpack(args, 1, n_args)); end
+	log("debug", "SQL transaction begin [%s]", tostring(func));
 	self.__transaction = true;
 	local success, a, b, c = xpcall(f, debug_traceback);
 	self.__transaction = nil;