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
Thanks for the report — confirmed, and the diagnosis is interesting: the UPDATE actually does persist, but same-connection reads don't see it.
What's happening: DML against live virtual tables must be routed through the module's xUpdate so the in-memory module instance and the backing storage stay coherent. INSERT and DELETE already do this (execute_live_vtab_insert_rows / execute_live_vtab_delete in fsqlite-core/src/connection.rs; the DELETE branch was added for #94 and its comment documents exactly this hazard). The Statement::Update arm never got the equivalent branch — it compiles a plain VDBE table-update program that mutates the persisted materialized backing rows but never touches the live RtreeVirtualTable instance that answers SELECT scans on the same connection. That's why changes() reports 1 and the bounds look unchanged: the write landed on disk, the in-memory R-tree is stale. You can verify this from your repro — closing and reopening the database shows the updated rectangle (1|5.0|20.0|5.0|6.0, matching SQLite exactly), because reopen rehydrates the vtab from the persisted rows.
So no data is lost, but any read in the same session after an rtree UPDATE returns stale geometry, which is a silent wrong-result and clearly unacceptable.
Planned handling: add a live-vtab branch to the UPDATE arm (connection.rs ~25015) mirroring the DELETE precedent — resolve the matching rowids and new row images (the trigger machinery already computes old/new pairs), then route each row through the module's xUpdate update form so both the in-memory instance and backing storage are written together, including the rtree first-column/rowid patching the INSERT path already applies. While fixing this we'll also cover the adjacent failure we found on the same path: UPDATE on an FTS5 table currently errors with "OpenWrite failed: could not open storage cursor on root page 0" for the same missing-routing reason, just with a louder failure mode. Both will be gated with parity tests against the rusqlite oracle covering full and partial coordinate updates plus rowid-change UPDATEs.
Status: confirmed and queued for a fix — tracked internally as bd-gh-live-vtab-update-routing-bw5nh with the full verified evidence and fix-location analysis attached. This issue stays open until the fix lands.
Verified fixed at main (fix commit 5905ec2, 'route live virtual-table UPDATE through the module'). RTree UPDATE now persists changed bounds (full and partial coordinate updates). Regression keeper crates/fsqlite-core/tests/rtree_update_live_refresh_gh208.rs passes (1/1) at HEAD.
Activity
Dicklesworthstone commentedon Jul 16, 2026
Thanks for the report — confirmed, and the diagnosis is interesting: the UPDATE actually does persist, but same-connection reads don't see it.
What's happening: DML against live virtual tables must be routed through the module's xUpdate so the in-memory module instance and the backing storage stay coherent. INSERT and DELETE already do this (
execute_live_vtab_insert_rows/execute_live_vtab_deleteinfsqlite-core/src/connection.rs; the DELETE branch was added for #94 and its comment documents exactly this hazard). TheStatement::Updatearm never got the equivalent branch — it compiles a plain VDBE table-update program that mutates the persisted materialized backing rows but never touches the liveRtreeVirtualTableinstance that answers SELECT scans on the same connection. That's whychanges()reports 1 and the bounds look unchanged: the write landed on disk, the in-memory R-tree is stale. You can verify this from your repro — closing and reopening the database shows the updated rectangle (1|5.0|20.0|5.0|6.0, matching SQLite exactly), because reopen rehydrates the vtab from the persisted rows.So no data is lost, but any read in the same session after an rtree UPDATE returns stale geometry, which is a silent wrong-result and clearly unacceptable.
Planned handling: add a live-vtab branch to the UPDATE arm (connection.rs ~25015) mirroring the DELETE precedent — resolve the matching rowids and new row images (the trigger machinery already computes old/new pairs), then route each row through the module's xUpdate update form so both the in-memory instance and backing storage are written together, including the rtree first-column/rowid patching the INSERT path already applies. While fixing this we'll also cover the adjacent failure we found on the same path: UPDATE on an FTS5 table currently errors with "OpenWrite failed: could not open storage cursor on root page 0" for the same missing-routing reason, just with a louder failure mode. Both will be gated with parity tests against the rusqlite oracle covering full and partial coordinate updates plus rowid-change UPDATEs.
Status: confirmed and queued for a fix — tracked internally as
bd-gh-live-vtab-update-routing-bw5nhwith the full verified evidence and fix-location analysis attached. This issue stays open until the fix lands.docs: align public claims with v0.2.0 async API, closed #70, and know…
chore(beads): #208 rtree UPDATE routing — root-caused + fix recipe, e…
fix(core): route live virtual-table UPDATE through the module (GH #208)
chore(beads): close bd-gh-live-vtab-update-routing (#208) — live-vtab…
chore(beads): #208 regression check clean (3 vtab reds pre-existing, …
Dicklesworthstone commentedon Aug 18, 2026
Verified fixed at main (fix commit 5905ec2, 'route live virtual-table UPDATE through the module'). RTree UPDATE now persists changed bounds (full and partial coordinate updates). Regression keeper crates/fsqlite-core/tests/rtree_update_live_refresh_gh208.rs passes (1/1) at HEAD.
docs(readme): reconcile current-state claims with the shipped runtime (…