Repository navigation
Db2 oracle: FETCH BEFORE | AFTER of a SCROLL cursor, proven on scrolldemo (Part of #4269) - #7160
Merged
Merged
Conversation
…demo (Part of #4269) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
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.
Summary
Part of #4269, slice 2 (follows #7148). The Db2 oracle now runs
EXEC SQL FETCH [INSENSITIVE] BEFORE | AFTER [FROM] cursorof a SCROLL cursor, so the det port'spositionScrollis proven against Db2 instead of only modelled.equivalence_sql.py: the no-INTO BEFORE / AFTER form becomes a scroll FETCH statement with no host variable; a cursor not declared SCROLL is refused by name.ggsql.c: BEFORE = CLISQLFetchScroll(ABSOLUTE 0); AFTER =LASTthenNEXT; SQLCODE 0, host variable untouched (the CLI'sSQL_NO_DATAis the parked position, not +100).SCRDEMO.cbl(scrolldemo): BEFORE, AFTER, theFROM/INSENSITIVEspellings, NEXT / PRIOR from each end, and an empty cursor.test_sql_dynamic.py: hand trace extended; port counts (22fetchScroll, 6positionScroll); a unit test of the oracle table and the SCROLL refusal.register/Q4.md: BEFORE/AFTER moved from "not yet proven" to proven on Db2.Evidence level
Executed-equivalent on real Db2 (local Docker container) and GnuCOBOL:
EQUIVALENCE_E2E=1 pytest test_sql_dynamic.py -k scrolldemopassed (proven: true, stdout equal to the hand trace). Oracle is GnuCOBOL plus Db2 LUW, not z/OS. Residual: an empty cursor's BEFORE/AFTER answers SQLCODE 0 on both sides (observed), not read from the z/OS book.Gates
pr_gates --fast9/9,--ratchets9 pass / 0 skipped,test_sql_dynamic.py+test_equivalence_sql.py157 passed / 4 skipped (the other Docker E2E ones), pinned ruff format clean. No translator or engine change; no golden bless.Class / Sibling gaps
Class: scroll-cursor FETCH forms that only move the position and read no row; BEFORE and AFTER are the only members, now handled on both the port and the oracle. Sibling gaps, each still refused by name and used by no burned-estate program: FETCH ROWSET STARTING AT or an orientation; INSERT NOT ATOMIC CONTINUE ON SQLEXCEPTION; ATOMIC undo on a mid-rowset failure; SENSITIVE and DYNAMIC scroll cursors; scroll cursors WITH HOLD across COMMIT.
Remaining slices
Checklist items 3-5 on #4269 look landed but unticked; not edited here. The sibling gaps above.
Cross-repo
None: no companion PR in another repo. Overlaps open #7157 on
Q4.mdandtest_sql_dynamic.py(small, disjoint hunks); whichever merges second merges main.🤖 Generated with Claude Code