# HG changeset patch # User Kim Alvefur # Date 1582322444 -3600 # Node ID 0c00274528a43c169c80535a80f42370e82eff06 # Parent 85585910d468fc44180e7ec7726d37bb41be880a 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 diff -r 85585910d468 -r 0c00274528a4 plugins/mod_storage_sql.lua --- a/plugins/mod_storage_sql.lua Thu Feb 13 14:27:12 2020 +0000 +++ b/plugins/mod_storage_sql.lua Fri Feb 21 23:00:44 2020 +0100 @@ -622,15 +622,15 @@ 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); + 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 engines[sql.db2uri(params)] = engine; end