Software /
code /
prosody
Diff
plugins/mod_storage_sql.lua @ 13661:5a7f042fe05d
mod_storage_sql: Fix tests for SQLite3
Tests does not run the code that initializes `sqlite_version`
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 08 Feb 2025 12:55:40 +0100 |
parent | 13634:7209769e88bc |
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua Fri Feb 07 10:19:36 2025 +0000 +++ b/plugins/mod_storage_sql.lua Sat Feb 08 12:55:40 2025 +0100 @@ -42,7 +42,7 @@ local function has_upsert(engine) if engine.params.driver == "SQLite3" then -- SQLite3 >= 3.24.0 - return (engine.sqlite_version[2] or 0) >= 24; + return engine.sqlite_version and (engine.sqlite_version[2] or 0) >= 24; elseif engine.params.driver == "PostgreSQL" then -- PostgreSQL >= 9.5 -- Versions without support have long since reached end of life.