You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(fts): action-event FTS triggers use UNINDEXED event_id instead of rowid #484
schema_ddl_actions.py:73,78 — FTS triggers on action_events DELETE/UPDATE use:
DELETEFROM action_events_fts WHERE event_id =old.event_id;
But event_id is declared UNINDEXED in the FTS5 table (schema_ddl_actions.py:49). Every delete or update of an action event triggers a full content scan of the FTS table.
The messages_fts triggers at schema_ddl_archive.py:271 use the correct pattern:
DELETEFROM messages_fts WHERE rowid =old.rowid;
rowid is implicitly indexed in FTS5 — this is O(1).
Same issue affects session_profiles_fts triggers at schema_ddl_product_profiles.py:73-74.
This is separate from #467 (which is about wrong column names in the triggers' INSERT statements).
Fix
Change all FTS DELETE/UPDATE triggers to reference rowid instead of content column IDs. The FTS INSERT triggers already store the source table's rowid — the DELETE/UPDATE triggers should use it.
Activity
fix: aggregate small fixes from adversarial audit (waves 1+2)