From c1655a181f3e4cf6404fad0d9a82da75e93c5cd9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 8 Feb 2025 12:55:40 +0100 Subject: mod_storage_sql: Fix tests for SQLite3 Tests does not run the code that initializes `sqlite_version` --- plugins/mod_storage_sql.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_storage_sql.lua') 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. -- cgit v1.2.3