Software /
code /
prosody
Diff
plugins/mod_storage_sql.lua @ 7857:db48b1697234
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 23 Jan 2017 19:34:14 +0100 |
parent | 7758:2b305ec8c146 |
parent | 7847:c430932b8113 |
child | 7859:9eb13c14eaab |
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua Fri Jan 13 18:30:18 2017 +0100 +++ b/plugins/mod_storage_sql.lua Mon Jan 23 19:34:14 2017 +0100 @@ -287,7 +287,7 @@ function archive_store:delete(username, query) query = query or {}; local user,store = username,self.store; - return engine:transaction(function() + local stmt, err = engine:transaction(function() local sql_query = "DELETE FROM `prosodyarchive` WHERE %s;"; local args = { host, user or "", store, }; local where = { "`host` = ?", "`user` = ?", "`store` = ?", }; @@ -300,6 +300,7 @@ 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; end local stores = {