Skip to content

det: EXEC SQL PREPARE FROM literal + EXECUTE name (Part of #4269) - #5594

Merged
squid-protocol merged 1 commit into
mainfrom
churn/4269-20261019T0939Z
Oct 19, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/4269-20261019T0939Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

What

EXEC SQL PREPARE name FROM '<INSERT ... VALUES literal>' and EXEC SQL EXECUTE name (no USING) in the det translator (det/sql.py) and the oracle precompiler (tests/tools/equivalence_sql.py). The literal is kept at the PREPARE (which runs a no-op: SQLCODE 0, no row) and run at each EXECUTE through the EXECUTE IMMEDIATE path (DetSql.savepoint).

Checklist: partial [c:fe6377e7] -- DESCRIBE, EXEC SQL CALL, CONNECT, prepared non-INSERT / EXECUTE ... USING / host-variable text left

Class table (dynamic SQL with source-literal text)

Member Status
EXECUTE IMMEDIATE 'INSERT..VALUES' done (#5415)
PREPARE FROM literal + EXECUTE name this PR
WHENEVER, COMMIT/ROLLBACK/SAVEPOINT done (#5338, #4729)
DESCRIBE, PREPARE INTO, EXECUTE USING, host-variable text, prepared UPDATE/DELETE/SELECT, CALL, CONNECT, CICS refused by name (siblings)

No burned estate issues any of these forms (Q4, 2026-10-05 census); proof is on the synthetic DYNDEMO estate.

Evidence

  • test_sql_dynamic.py + test_sql_whenever.py: 50 passed with EQUIVALENCE_E2E=1 (DYNDEMO proven on real Db2 by GnuCOBOL + our stub: F PREPARE 0, G EXECUTE 0, H second EXECUTE -803).
  • pr_gates --fast 6/6, --ratchets all PASS (golden unaffected: translator/test-oracle only).
  • Q4 register updated with the assumptions: -104 for bad text lands at EXECUTE; run-time EXECUTE-before-PREPARE (-518) not modelled.

Cross-repo

None.

🤖 Generated with Claude Code

…e (Part of #4269)

The literal is kept at the PREPARE (which leaves SQLCODE 0, touches no row) and run at each EXECUTE through
EXECUTE IMMEDIATE's path. The oracle precompiler takes the same forms; DYNDEMO proves them on Db2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 19, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 19, 2026 10:01
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 19, 2026 10:02
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant