Skip to content

fix(sundb): preserve complete function source - #2831

Open
HandSonic wants to merge 1 commit into
OtterMind:mainfrom
HandSonic:fix/sundb-function-source-lines
Open

fix(sundb): preserve complete function source#2831
HandSonic wants to merge 1 commit into
OtterMind:mainfrom
HandSonic:fix/sundb-function-source-lines

Conversation

@HandSonic

@HandSonic HandSonic commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Related issue

N/A - no matching issue was found.

Summary

SunDB function detail metadata read only the first row from ALL_SOURCE, truncating every multiline function body. The shared source query also had no line ordering. This change reads every source row and orders function/procedure source by LINE, preserving the existing newline-separated body format.

Affected surfaces

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

Verification

  • Commands and results:
    • Red test returned only the first of two source rows.
    • Focused function source test: 1 passed.
    • SunDB module tests after rebase: 26 passed.
    • Plugin reactor package: succeeded.
    • Fork code and CodeQL checks: rerunning for the rebased head.
    • Merge-tree with upstream fix(sundb): return distinct procedure records #2807: passed.
  • Manual verification: N/A - strict JDBC proxies supply ordered source rows and capture the generated SQL.
  • UI evidence: N/A

Risk and compatibility

  • Public API or stored data: No API or stored data changes.
  • Database or driver compatibility: SunDB routine source queries only; source text is no longer truncated.
  • Network, privacy, or security: N/A.
  • Community / Local / Pro boundary: Shared Community SunDB plugin.
  • Backward compatibility: Single-line bodies retain the same text plus trailing newline.

Reviewer map

  • Start here: SUNDBMetaData.function and shared ALL_SOURCE_SQL.
  • Failure condition: only the first source row is returned or rows are not ordered by LINE.
  • Rollback or disable path: Revert commit f99a0980285bb2fa15ec70d1740aea404dff3e6d; 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/sundb-function-source-lines branch from 1e1c1c0 to f99a098 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