aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-02-21 23:00:44 +0100
committerKim Alvefur <zash@zash.se>2020-02-21 23:00:44 +0100
commit84e0c87b7e165f58f8061ad92c73dddc100cee23 (patch)
tree3af3bdf24ef8e99460aaf7fad0ae994ef6d61e99 /plugins
parentccc5516646c302d2f749e22ac674a296c30ddd3b (diff)
downloadprosody-84e0c87b7e165f58f8061ad92c73dddc100cee23.tar.gz
prosody-84e0c87b7e165f58f8061ad92c73dddc100cee23.zip
mod_storage_sql: Fix check for deletion limits (fixes #1494)
The check was only performed if sql_manage_tables was set to true (the default) It should always be performed
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_storage_sql.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index a449091e..a9298138 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -622,15 +622,15 @@ function module.load()
module:log("error", "Old database format detected. Please run: prosodyctl mod_%s upgrade", module.name);
return false, "database upgrade needed";
end
- if engine.params.driver == "SQLite3" then
- for row in engine:select("PRAGMA compile_options") do
- if row[1] == "ENABLE_UPDATE_DELETE_LIMIT" then
- engine._have_delete_limit = true;
- end
- end
- end
end
end);
+ if engine.params.driver == "SQLite3" then
+ for row in engine:select("PRAGMA compile_options") do
+ if row[1] == "ENABLE_UPDATE_DELETE_LIMIT" then
+ engine._have_delete_limit = true;
+ end
+ end
+ end
engines[sql.db2uri(params)] = engine;
end