Tags: sqliteai/sqlite-vector
Tags
Some issues fixed
#: 1
Severity: HIGH
File: distance-avx512.c:877
Fix: Removed (n+7)/8 — n is already byte count from all callers, matching CPU/NEON/SSE2/AVX2 backends
────────────────────────────────────────
#: 2
Severity: MEDIUM
File: sqlite-vector.c:1949
Fix: Added vector_allocated flag and sqlite3_free calls on all exit paths in vCursorFilterCommon when vector was allocated by vector_from_json
────────────────────────────────────────
#: 3
Severity: LOW
File: sqlite-vector.c:1194
Fix: Swapped the ternary branches so is_without_rowid==true gets the "must have INTEGER PRIMARY KEY" error and is_without_rowid==false gets the "Out of memory"
error
────────────────────────────────────────
#: 4
Severity: LOW
File: sqlite-vector.c:1058
Fix: Added KEY_MATCH macro that checks key_len == sizeof(key)-1 before strncasecmp, preventing prefix matches like "ty" matching "type"
fix(vtab): streaming mode ignored ORDER BY due to wrong orderByConsum… …ed flag (#43) vFullScanBestIndex checked VECTOR_COLUMN_K (column 2) to detect top-k mode, but with SQLite table-valued functions, positional arg 2 (the vector blob) always maps to column 2 — so orderByConsumed was always set to 1, even in streaming mode. SQLite then skipped sorting entirely. Fix: detect top-k mode by checking VECTOR_COLUMN_MEMIDX (column 3), which only has a constraint when the 4th positional arg (k) is provided. Added regression test covering stream + JOIN + ORDER BY + LIMIT. Co-Authored-By: Claude Opus 4.6 <[email protected]>
PreviousNext