sqlite-vec/tests
Alex Garcia fe941716ad Finalize all cached vec0 stmts on commit (fixes #295)
vec0Sync only finalized stmtLatestChunk and the four stmtRowids* stmts.
The IVF/DiskANN/vectors stmts persisted on the vtab until xDisconnect,
which blocked sqlite3_close() (non-v2) with SQLITE_BUSY — the original
mozStorage case from #295. The same leak also broke VACUUM with
"SQL statements in progress" after any DiskANN operation.

Switch vec0Sync to call vec0_free_resources, which already finalizes
the full cache. Also fix a latent bug: the DiskANN block in
vec0_free_resources was nested inside #if SQLITE_VEC_EXPERIMENTAL_IVF_ENABLE,
so in the default build (DiskANN on, IVF off) those finalizes were
unreachable even from xDisconnect/xDestroy. Split into two independent
#if guards.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 23:49:05 -07:00
..
__snapshots__ Enable auxiliary columns for rescore, IVF, and DiskANN indexes 2026-03-31 18:27:02 -07:00
afbd Metadata filtering (#124) 2024-11-20 00:59:34 -08:00
correctness Add ANN search support for vec0 virtual table (#273) 2026-03-31 01:03:32 -07:00
fixtures Add FTS5-style command column and runtime oversample for rescore 2026-03-31 22:39:18 -07:00
fuzz Add FTS5-style command column and runtime oversample for rescore 2026-03-31 22:39:18 -07:00
leak-fixtures fuzz work 2024-07-25 11:16:06 -07:00
minimum properly check SQLITE_THREADSAFE for static compilation 2024-08-09 13:23:18 -07:00
.gitignore Initial commit 2024-04-20 13:38:58 -07:00
.python-version PARTITION KEY support (#122) 2024-11-20 00:02:04 -08:00
build.rs Update test-unit.c and unittest.rs functions to enforce pre-existing behavior 2026-03-02 17:46:11 -08:00
Cargo.lock Initial commit 2024-04-20 13:38:58 -07:00
Cargo.toml Initial commit 2024-04-20 13:38:58 -07:00
conftest.py Hide IVF behind SQLITE_VEC_EXPERIMENTAL_IVF_ENABLE, default off 2026-03-31 01:18:47 -07:00
fuzz.py docs and fuzz 2024-07-16 22:28:15 -07:00
generate_legacy_db.py Add FTS5-style command column and runtime oversample for rescore 2026-03-31 22:39:18 -07:00
helpers.py Extract shared Python test utilities into tests/helpers.py 2026-03-02 20:05:21 -08:00
pyproject.toml PARTITION KEY support (#122) 2024-11-20 00:02:04 -08:00
skip.test-correctness.py PARTITION KEY support (#122) 2024-11-20 00:02:04 -08:00
sqlite-vec-internal.h Add DiskANN index for vec0 virtual table 2026-03-31 01:21:54 -07:00
test-auxiliary.py Enable auxiliary columns for rescore, IVF, and DiskANN indexes 2026-03-31 18:27:02 -07:00
test-cache-finalize.py Finalize all cached vec0 stmts on commit (fixes #295) 2026-05-17 23:49:05 -07:00
test-diskann.py Add FTS5-style command column and runtime oversample for rescore 2026-03-31 22:39:18 -07:00
test-general.py Add FTS5-style command column and runtime oversample for rescore 2026-03-31 22:39:18 -07:00
test-insert-delete.py Support INSERT OR REPLACE for vec0 virtual tables (fixes #127) 2026-03-31 23:35:22 -07:00
test-ivf-mutations.py Add FTS5-style command column and runtime oversample for rescore 2026-03-31 22:39:18 -07:00
test-ivf-quantization.py Add FTS5-style command column and runtime oversample for rescore 2026-03-31 22:39:18 -07:00
test-ivf-rename.py Rename all IVF shadow tables in vec0Rename 2026-05-17 23:09:27 -07:00
test-ivf.py Add FTS5-style command column and runtime oversample for rescore 2026-03-31 22:39:18 -07:00
test-knn-distance-constraints.py Extract shared Python test utilities into tests/helpers.py 2026-03-02 20:05:21 -08:00
test-legacy-compat.py Add FTS5-style command column and runtime oversample for rescore 2026-03-31 22:39:18 -07:00
test-loadable.py Reject NaN and Inf in float32 vector input 2026-03-31 17:52:12 -07:00
test-metadata.py Fix SQLITE_DONE leak in ClearMetadata that broke DELETE on long text metadata (#274) (#275) 2026-03-30 16:39:59 -07:00
test-partition-keys.py Extract shared Python test utilities into tests/helpers.py 2026-03-02 20:05:21 -08:00
test-rename.py Rename all IVF shadow tables in vec0Rename 2026-05-17 23:09:27 -07:00
test-rescore-mutations.py Enable auxiliary columns for rescore, IVF, and DiskANN indexes 2026-03-31 18:27:02 -07:00
test-rescore.py Add FTS5-style command column and runtime oversample for rescore 2026-03-31 22:39:18 -07:00
test-unit.c Add DiskANN index for vec0 virtual table 2026-03-31 01:21:54 -07:00
test-wasm.mjs fmt 2024-07-31 12:55:46 -07:00
unittest.rs Update test-unit.c and unittest.rs functions to enforce pre-existing behavior 2026-03-02 17:46:11 -08:00
utils.py Initial commit 2024-04-20 13:38:58 -07:00
uv.lock PARTITION KEY support (#122) 2024-11-20 00:02:04 -08:00