Skip to content

Fix duplicate package name in initialization backtrace - #1720

Open
btlqql wants to merge 1 commit into
IvorySQL:masterfrom
btlqql:codex/issue-1710-backtrace
Open

Fix duplicate package name in initialization backtrace#1720
btlqql wants to merge 1 commit into
IvorySQL:masterfrom
btlqql:codex/issue-1710-backtrace

Conversation

@btlqql

@btlqql btlqql commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • avoid prefixing a package initialization frame with the package name twice
  • keep schema-qualified package names in FORMAT_ERROR_BACKTRACE
  • add a regression case for an exception raised by a package initialization block

Validation

  • make -C src/include all
  • make -C src/pl/plisql/src pl_exec.o
  • git diff --check

A full Cygwin build was also attempted. It reached the unchanged src/backend/oracle_parser target, where linking liboracle_parser.dll failed on the existing OraScanKeywordTokens import symbol, so the regression suite could not be started in this environment.

Fixes #1710

Summary by CodeRabbit

  • Bug Fixes

    • Corrected package initialization error backtraces to show the schema-qualified package name without duplicating the package name.
    • Preserved fully qualified schema, package, and function details for regular package members.
  • Tests

    • Added coverage for error backtraces raised during package initialization.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 76a532d5-f618-4c92-ac1e-9ad008c06482

📥 Commits

Reviewing files that changed from the base of the PR and between ef914ad and e33d6d6.

📒 Files selected for processing (3)
  • contrib/ivorysql_ora/expected/dbms_utility.out
  • contrib/ivorysql_ora/sql/dbms_utility.sql
  • src/pl/plisql/src/pl_exec.c

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

Package-qualified signature construction now formats package initialization roots without duplicating the package name. A DBMS_UTILITY regression test covers schema-qualified package initialization failures and validates the resulting backtrace.

Changes

Package initialization backtrace

Layer / File(s) Summary
Package signature formatting
src/pl/plisql/src/pl_exec.c
Package initialization roots now return only the quoted schema and package name. Package members continue to include the function name.
Backtrace regression test
contrib/ivorysql_ora/sql/dbms_utility.sql, contrib/ivorysql_ora/expected/dbms_utility.out
Added an end-to-end test that raises an initialization error, checks schema and package qualification without duplication, and cleans up the created objects.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to e33d6

The PR makes a localized backtrace-formatting fix with regression coverage and no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested reviewers: bigplaice

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the fix for duplicate package names in initialization backtraces.
Linked Issues check ✅ Passed The code fix and regression test address issue #1710 by removing duplicated package names while preserving schema-qualified backtraces.
Out of Scope Changes check ✅ Passed The changes are limited to the backtrace fix and its targeted package-initialization regression test.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hanjianqiao hanjianqiao self-assigned this Aug 20, 2026
@NotHimmel

Copy link
Copy Markdown
Collaborator

Thanks for your contribution!

@hanjianqiao hanjianqiao removed their assignment Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DBMS_UTILITY.FORMAT_ERROR_BACKTRACE during a package's own initialization block is wrong

3 participants