aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_sql.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-01-24 19:27:17 +0100
committerKim Alvefur <zash@zash.se>2017-01-24 19:27:17 +0100
commit45334397e8ae6def260f86a681a509275c67c395 (patch)
tree2421f921894940e72b7ce82614ed89c20fd9edf3 /plugins/mod_storage_sql.lua
parentdb88e0f7b51eeaed68b9b50502b6ba82c53633a1 (diff)
parenta4370a9db89edafd2bbe54e59644f36db49ce07d (diff)
downloadprosody-45334397e8ae6def260f86a681a509275c67c395.tar.gz
prosody-45334397e8ae6def260f86a681a509275c67c395.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_storage_sql.lua')
-rw-r--r--plugins/mod_storage_sql.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index 7bbae40c..dcb00dd6 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -287,7 +287,7 @@ end
function archive_store:delete(username, query)
query = query or {};
local user,store = username,self.store;
- local stmt, err = engine:transaction(function()
+ local ok, stmt = engine:transaction(function()
local sql_query = "DELETE FROM `prosodyarchive` WHERE %s;";
local args = { host, user or "", store, };
local where = { "`host` = ?", "`user` = ?", "`store` = ?", };
@@ -300,7 +300,7 @@ function archive_store:delete(username, query)
sql_query = sql_query:format(t_concat(where, " AND "));
return engine:delete(sql_query, unpack(args));
end);
- return stmt and stmt:affected() or nil, err;
+ return ok and stmt:affected(), stmt;
end
local stores = {