# HG changeset patch # User Kim Alvefur # Date 1739015740 -3600 # Node ID 5a7f042fe05d97a787a759f7dbc8b4677ed7d3a2 # Parent 31f8fd2bcab9063e785e1ee35faa4cae62189355 mod_storage_sql: Fix tests for SQLite3 Tests does not run the code that initializes `sqlite_version` diff -r 31f8fd2bcab9 -r 5a7f042fe05d plugins/mod_storage_sql.lua --- 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.