limbo/scripts
Glauber Costa 7e76970035 fix: Handle fresh INSERTs in materialized view incremental maintenance
The op_insert function was incorrectly trying to capture an "old record"
for fresh INSERT operations when a table had dependent materialized views.
This caused a "Cannot delete: no current row" error because the cursor
wasn't positioned on any row for new inserts.

The issue was introduced in commit f38333b3 which refactored the state
machine for incremental view handling but didn't properly distinguish
between:
- Fresh INSERT operations (no old record exists)
- UPDATE operations without rowid change (old record should be captured)
- UPDATE operations with rowid change (already handled by DELETE)

This fix checks if cursor.rowid() returns a value before attempting to
capture the old record. If no row exists (fresh INSERT), we correctly
set old_record to None instead of erroring out.

I am also including tests to make sure this doesn't break. The reason I
didn't include tests earlier is that I didn't know it was possible to
run the tests under a flag. But in here, I am just adding the flag to
the execution script.
2025-08-13 06:41:14 -05:00
..
antithesis antithesis: Run experiments for 8 hours 2025-07-10 19:37:45 +03:00
clone_test_db.sh Clear test db's WAL too in clone_test_db.sh 2025-05-26 22:00:39 +03:00
gen-changelog.py uv run ruff format && uv run ruff check --fix 2025-07-09 10:06:29 +03:00
limbo-sqlite3 fix: Handle fresh INSERTs in materialized view incremental maintenance 2025-08-13 06:41:14 -05:00
limbo-sqlite3-index-experimental remove experimental_flag from script + remove -q flag default flag from TestTursoShell 2025-07-07 15:34:03 -03:00
merge-pr.py Check repository scope in merge pr script 2025-07-31 11:39:57 -04:00
publish-crates.sh scripts/publish-crates.sh: s/limbo/turso/ 2025-06-30 10:59:25 +03:00
pyproject.toml Fix merge-py.py script to use github CLI and add makefile command 2025-07-31 10:20:17 -04:00
run-sim rust pass arguments to run-sim 2025-07-07 12:23:00 -03:00
update-version.py Add sync package to scripts/update-version.py 2025-08-08 16:50:02 +03:00