aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-02-22 16:23:43 +0100
committerKim Alvefur <zash@zash.se>2020-02-22 16:23:43 +0100
commit60a3d89260c46df3e0135c1a72b3e7b55a476be6 (patch)
tree197f657b6f32a0e63cc7dc20928cc07bee3c8e1a
parente1fe3bab8f8025e681829542d4eddd27c4f39dd5 (diff)
downloadprosody-60a3d89260c46df3e0135c1a72b3e7b55a476be6.tar.gz
prosody-60a3d89260c46df3e0135c1a72b3e7b55a476be6.zip
mod_storage_sql: Move update limit check back one step, fixes traceback
0c00274528a4 moved it one step too far, so the check was performed before connecting to the database instead of after.
-rw-r--r--plugins/mod_storage_sql.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index a9298138..73207073 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -623,14 +623,14 @@ function module.load()
return false, "database upgrade needed";
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;
+ 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);
engines[sql.db2uri(params)] = engine;
end