diff options
author | Kim Alvefur <zash@zash.se> | 2025-02-08 12:55:40 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2025-02-08 12:55:40 +0100 |
commit | c1655a181f3e4cf6404fad0d9a82da75e93c5cd9 (patch) | |
tree | fcbdf89ec9a0e91dedc06a5a48d5dcbc05975bf8 /plugins/mod_storage_sql.lua | |
parent | d6f8c4fe182cd82c44dc8e1ee350008538eb1272 (diff) | |
download | prosody-c1655a181f3e4cf6404fad0d9a82da75e93c5cd9.tar.gz prosody-c1655a181f3e4cf6404fad0d9a82da75e93c5cd9.zip |
mod_storage_sql: Fix tests for SQLite3
Tests does not run the code that initializes `sqlite_version`
Diffstat (limited to 'plugins/mod_storage_sql.lua')
-rw-r--r-- | plugins/mod_storage_sql.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index fa0588b2..ff44adba 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -42,7 +42,7 @@ end 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. |