fix(engine): walk past stale index entries instead of raising 5000 - #135
Merged
FiveTechSoft merged 1 commit intoJul 29, 2026
Merged
Conversation
PACK leaves bound tags stale on purpose (Clipper semantics: the caller REINDEXes), and a tag that was unbound at PACK time and reopened afterwards still maps keys to recnos above the compacted record count. goto_top / goto_bottom / skip loaded those recnos and propagated the driver's 5000 'record number out of range', so a browse over such a tag died instead of navigating. Native ADSCDX walks past them. They now treat a 5000 from load_record_ like a deleted row and step to the next entry; any other error still propagates. In skip with SET DELETED OFF the probe is gated on recno > record_count, so the common path does no extra I/O. New test abi_stale_index_walk_test: build a tag, close it, delete two rows, PACK, reopen the now-stale tag and walk it — GotoTop / GetDouble / Skip must all succeed and visit exactly the surviving rows. Found while running a Harbour/FiveWin ERP's reindex cycle on OpenADS. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
FiveTechSoft
added a commit
that referenced
this pull request
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PACK leaves bound tags stale on purpose (Clipper semantics: the caller REINDEXes), and a tag that was unbound at PACK time and reopened afterwards still maps keys to recnos above the compacted record count.
goto_top/goto_bottom/skiploaded those recnos and propagated the driver's 5000 "record number out of range", so a browse over such a tag died instead of navigating. Native ADSCDX walks past them.They now treat a 5000 from
load_record_like a deleted row and step to the next entry; any other error still propagates. Inskipwith SET DELETED OFF the probe is gated onrecno > record_count, so the common path does no extra I/O.Test:
abi_stale_index_walk_test— build a tag, close it, delete two rows, PACK, reopen the now-stale tag and walk it:GotoTop/GetDouble/Skipmust all succeed and visit exactly the surviving rows.Found while running a Harbour/FiveWin ERP's reindex cycle on OpenADS.
Suite: 1178/1190 — the same 12 pre-existing SQL-parser (7200) failures as pristine v1.8.31, verified on this branch in isolation (MSVC x64 Release).
🤖 Generated with Claude Code