aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_sql2.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2014-01-18 18:44:58 +0000
committerMatthew Wild <mwild1@gmail.com>2014-01-18 18:44:58 +0000
commita651d9102302e73f181bc3a81ecdae8f9e21b649 (patch)
tree780d6035d4a4b758b773a8c2aaea79c554184cf5 /plugins/mod_storage_sql2.lua
parentf240b6bd4dcc33c040ca3913ce54d3d31c4dbf1b (diff)
parent1262f0373f70ecdc0f7e39c5ffbe065bc8042ce5 (diff)
downloadprosody-a651d9102302e73f181bc3a81ecdae8f9e21b649.tar.gz
prosody-a651d9102302e73f181bc3a81ecdae8f9e21b649.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_storage_sql2.lua')
-rw-r--r--plugins/mod_storage_sql2.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_storage_sql2.lua b/plugins/mod_storage_sql2.lua
index 8c8728da..b9e9d3ca 100644
--- a/plugins/mod_storage_sql2.lua
+++ b/plugins/mod_storage_sql2.lua
@@ -263,12 +263,12 @@ local function archive_where_id_range(query, args, where)
local args_len = #args
-- Before or after specific item, exclusive
if query.after then -- keys better be unique!
- where[#where+1] = "`sort_id` > (SELECT `sort_id` FROM `prosodyarchive` WHERE `key` = ? AND `host` = ?` AND user` = ?` AND store` = ? LIMIT 1)"
+ where[#where+1] = "`sort_id` > (SELECT `sort_id` FROM `prosodyarchive` WHERE `key` = ? AND `host` = ? AND `user` = ? AND `store` = ? LIMIT 1)"
args[args_len+1], args[args_len+2], args[args_len+3], args[args_len+4] = query.after, args[1], args[2], args[3];
args_len = args_len + 4
end
if query.before then
- where[#where+1] = "`sort_id` < (SELECT `sort_id` FROM `prosodyarchive` WHERE `key` = ? AND `host` = ?` AND user` = ?` AND store` = ? LIMIT 1)"
+ where[#where+1] = "`sort_id` < (SELECT `sort_id` FROM `prosodyarchive` WHERE `key` = ? AND `host` = ? AND `user` = ? AND `store` = ? LIMIT 1)"
args[args_len+1], args[args_len+2], args[args_len+3], args[args_len+4] = query.before, args[1], args[2], args[3];
end
end