Software /
code /
prosody
Changeset
13156:019cd1db9bec
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 17 Jun 2023 00:00:21 +0200 |
parents | 13155:9a7523ea45cb |
children | 13157:841276d0cc25 |
files | plugins/mod_storage_sql.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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