Repository navigation
det: EXEC SQL EXECUTE IMMEDIATE literal INSERT ... VALUES (Part of #4269) - #5415
Merged
Merged
Conversation
The literal statement text runs as written on the unit of work's connection (DetSql.savepoint's path), Db2 answering; the oracle precompiler mirrors it. Other dynamic SQL forms stay refused by name. Proven on Db2 by the synthetic estate tests/equivalence/db2/dynsql (DYNDEMO). Q4 register updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 18, 2026 05:51
squid-protocol
enabled auto-merge (squash)
October 18, 2026 05:53
Owner
Author
|
No description provided. |
Contributor
Owner
Author
|
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.
What changed
EXEC SQL EXECUTE IMMEDIATE '<literal INSERT ... VALUES ...>'now translates (det port). The literal runs as written on the unit of work's connection via the existingDetSql.savepointpath, so Db2 answers. The oracle precompiler (tests/tools/equivalence_sql.py) mirrors it with an independent regex.Design decision
Scope narrowed from "all non-SELECT" to INSERT ... VALUES with a literal text and no parameter marker. Reason:
savepointsets no row count, and UPDATE/DELETE need the +100 mapping, which means aDetSql.javachange that moves every Db2 port. Everything else is refused by name.Evidence
tests/equivalence/db2/dynsql(DYNDEMO: inserts, doubled quote, -803, WHENEVER + missing table -204): e2e on real Db2 reportsproven, trace matches.Gates
det_port check: 122/122 unchanged.pr_gates --fast6/6,--ratchets8/8. Guard + sql tests 211 passed, 2 skipped.time_ratchet: 0 over.equivalence_env --check10/10. Golden not run (no scanned-engine parsing change).Sibling gaps
Host-variable text (needs ggsql.c); dynamic UPDATE/DELETE/MERGE/INSERT...SELECT/DDL (needs row count, DetSql.java); PREPARE/EXECUTE USING/DESCRIBE; EXEC SQL CALL; CONNECT; scroll FETCH; host arrays; DSNTIAR/DSNTIAC; EXECUTE IMMEDIATE in CICS.
Lessons for agents
det/sql.py; use a constant message.🤖 Generated with Claude Code