SIGN IN SIGN UP

Merge 'Flush index-method cursors when a subprogram halts' from Vartan Babayan

Foreign-key cascades and triggers that write to `FTS-indexed table` left
the index stale and could panic
`ON DELETE / UPDATE CASCADE`, `SET NULL / DEFAULT` and `triggers` all
run as **subprograms** and each with its own state, so flush the parent
runs when it commits, only covers its own writes and misses the ones
buffered inside the subprogram
This change makes sure that a subprogram flushes its buffered index-
method writes when it stops, while the parent write transaction is still
open
And added 4 integration tests  to cover all edge cases (FK cascade,
trigger INSERT/UPDATE, multi-row fires and aborted subprograms)
Closes #7530

Reviewed-by: Mikaël Francoeur (@LeMikaelF)

Closes #8354
P
Preston Thorpe committed
bad083fafbefdeae9a42ec19bdaaad8918dcf411
Committed by GitHub <noreply@github.com> on 8/13/2026, 7:01:08 PM