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
vec0 UPDATE SET rowid reports success but silently leaves the rowid unchanged #332
On a vec0 virtual table, UPDATE ... SET rowid = <new> reports rowcount = 1 (one row affected) but silently leaves the rowid unchanged. The caller is told the update succeeded; the table did not change.
Environment
sqlite-vec 0.1.9 (pip loadable extension), Python 3.12 sqlite3, Windows x64
Steps to reproduce
db.execute("CREATE VIRTUAL TABLE v USING vec0(a float[2])")
db.execute("INSERT INTO v(rowid, a) VALUES (1, ?)", ...); db.execute("INSERT INTO v(rowid, a) VALUES (2, ?)", ...)
cur=db.execute("UPDATE v SET rowid = 3 WHERE rowid = 2")
print(cur.rowcount) # 1 <- claims successprint(db.execute("SELECT rowid FROM v").fetchall()) # [(1,), (2,)] <- unchanged
Full script attached (reproduce.py).
Expected behavior
Either the rowid update is applied (rowid 2 becomes 3), or the statement fails with a clear error ("rowid updates are not supported on vec0 tables"). Silently reporting success while doing nothing violates SQLite's statement semantics.
Actual behavior
rowcount=1, no change, no error.
Additional notes
UPDATE of the vector column itself works correctly (verified: stored vector, distances and metadata all update consistently) — only the rowid target is affected.
Plain-table control: UPDATE t SET rowid_ = 3 WHERE rowid_ = 2 applies normally.
Activity