aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-11-08 10:45:58 +0100
committerKim Alvefur <zash@zash.se>2017-11-08 10:45:58 +0100
commite6d2431c5289e196554e4983730bc47fd24b0b1f (patch)
treed95f5b6777b2a69c750f9af45584818827863d2a /util
parentd9535fcf4fc359d3003e4a1c49b2a437d9dda1af (diff)
downloadprosody-e6d2431c5289e196554e4983730bc47fd24b0b1f.tar.gz
prosody-e6d2431c5289e196554e4983730bc47fd24b0b1f.zip
util.sql: Discard useless substitution count from string.gsub in SQL debug logs
Diffstat (limited to 'util')
-rw-r--r--util/sql.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/sql.lua b/util/sql.lua
index d964025e..13f25f7b 100644
--- a/util/sql.lua
+++ b/util/sql.lua
@@ -161,14 +161,14 @@ local result_mt = { __index = {
local function debugquery(where, sql, ...)
local i = 0; local a = {...}
sql = sql:gsub("\n?\t+", " ");
- log("debug", "[%s] %s", where, sql:gsub("%?", function ()
+ log("debug", "[%s] %s", where, (sql:gsub("%?", function ()
i = i + 1;
local v = a[i];
if type(v) == "string" then
v = ("'%s'"):format(v:gsub("'", "''"));
end
return tostring(v);
- end));
+ end)));
end
function engine:execute_query(sql, ...)