# HG changeset patch # User Kim Alvefur # Date 1686952821 -7200 # Node ID 019cd1db9bec78e42326910adfdd3973893172ac # Parent 9a7523ea45cbef5b7e81e5350fb840aba1eeb710 mod_storage_sql: Be more specific when checking for old index in SQLite3 Prevents false positives in the odd case where something other than an index with this name might exist. diff -r 9a7523ea45cb -r 019cd1db9bec plugins/mod_storage_sql.lua --- a/plugins/mod_storage_sql.lua Fri Jun 16 23:57:15 2023 +0200 +++ b/plugins/mod_storage_sql.lua Sat Jun 17 00:00:21 2023 +0200 @@ -850,7 +850,7 @@ local indices = {}; engine:transaction(function () if params.driver == "SQLite3" then - for row in engine:select [[SELECT "name" from "sqlite_schema" WHERE "name"='prosody_index';]] do + for row in engine:select [[SELECT "name" FROM "sqlite_schema" WHERE "type"='index' AND "tbl_name"='prosody' AND "name"='prosody_index';]] do indices[row[1]] = true; end elseif params.driver == "PostgreSQL" then