Diff

plugins/mod_storage_sql.lua @ 10032:de5ab807e438

mod_storage_sql: Fix to use correct arguments to archive id lookup
author Kim Alvefur <zash@zash.se>
date Tue, 28 May 2019 00:47:50 +0200
parent 10031:17c175ad65f9
child 10033:ca8333d1a7fe
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua	Tue May 28 00:46:24 2019 +0200
+++ b/plugins/mod_storage_sql.lua	Tue May 28 00:47:50 2019 +0200
@@ -336,7 +336,7 @@
 	]];
 	if query.after then  -- keys better be unique!
 		local after_id = nil;
-		for row in engine:select(id_lookup_sql, query.after, host, user or "", store) do
+		for row in engine:select(id_lookup_sql, query.after, args[1], args[2], args[3]) do
 			after_id = row[1];
 		end
 		if not after_id then
@@ -347,7 +347,7 @@
 	end
 	if query.before then
 		local before_id = nil;
-		for row in engine:select(id_lookup_sql, query.after, host, user or "", store) do
+		for row in engine:select(id_lookup_sql, query.after, args[1], args[2], args[3]) do
 			before_id = row[1];
 		end
 		if not before_id then