Skip to content

fix(h2): bind routine details to schema - #2825

Open
HandSonic wants to merge 1 commit into
OtterMind:mainfrom
HandSonic:fix/h2-routine-schema-binding
Open

HandSonic wants to merge 1 commit into
OtterMind:mainfrom
HandSonic:fix/h2-routine-schema-binding

Conversation

@HandSonic

@HandSonic HandSonic commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Related issue

N/A - no matching issue was found.

Summary

H2 function, procedure, and trigger detail queries placed the catalog name into ROUTINE_SCHEMA / TRIGGER_SCHEMA predicates. In ordinary catalog-plus-schema connections this returned no detail or the wrong schema. This change binds those predicates to the requested schema while preserving the catalog on the returned metadata objects.

Affected surfaces

  • Frontend / Web
  • Backend / API / Storage
  • Database plugin / Driver
  • JCEF / Desktop packaging
  • CI / Build / Release
  • Documentation only

Verification

  • Commands and results:
    • Strict JDBC schema-binding regression test: 1 passed.
    • H2 module tests after rebase: 33 passed.
    • Plugin reactor package: succeeded.
    • Fork Frontend, Backend, JavaScript CodeQL, and Java CodeQL checks: rerunning for the rebased head.
    • git diff --check origin/main...HEAD: passed.
  • Manual verification: N/A - the proxy captures the real generated SQL for all three detail methods.
  • UI evidence: N/A

Risk and compatibility

  • Public API or stored data: No API or storage changes.
  • Database or driver compatibility: H2 metadata detail predicates only; returned catalog/schema fields are unchanged.
  • Network, privacy, or security: N/A.
  • Community / Local / Pro boundary: Shared Community H2 plugin.
  • Backward compatibility: Connections where catalog and schema happen to match retain equivalent SQL.

Reviewer map

  • Start here: H2Meta.function, procedure, trigger, and H2MetaSchemaBindingTest.
  • Failure condition: schema predicates contain the catalog, or list/detail schema behavior diverges.
  • Rollback or disable path: Revert commit 38355c81590f6c2cec1592854483041ed52ef966; no migration is required.

Contributor declaration

  • I linked the Issue that defines this change.
  • I tested the affected behavior and reported the actual results above.
  • I did not include credentials, private data, or generated build output.
  • I disclosed substantial AI assistance below, or this PR contains no substantial AI-generated code.

AI assistance: OpenAI Codex assisted with diagnosis, implementation, automated tests, verification, and adversarial review.

@HandSonic
HandSonic force-pushed the fix/h2-routine-schema-binding branch from f33bb3a to 38355c8 Compare September 3, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants