diff options
author | Kim Alvefur <zash@zash.se> | 2017-01-23 19:34:14 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-01-23 19:34:14 +0100 |
commit | db88e0f7b51eeaed68b9b50502b6ba82c53633a1 (patch) | |
tree | ea895b1073f2ff2de7a08fc01f12797ab58c7125 /plugins/mod_storage_sql.lua | |
parent | 26f2953106794bbdd23db98f69fb6e90a4b8e460 (diff) | |
parent | ffde63fe687f5ffecf5fdec28358d1774a8a7169 (diff) | |
download | prosody-db88e0f7b51eeaed68b9b50502b6ba82c53633a1.tar.gz prosody-db88e0f7b51eeaed68b9b50502b6ba82c53633a1.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_storage_sql.lua')
-rw-r--r-- | plugins/mod_storage_sql.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index 50d9cd0f..7bbae40c 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; - 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 @@ 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; end local stores = { |