Skip to content

DBMS_UTILITY.FORMAT_CALL_STACK mislabels procedures and anonymous blocks as functions #2317

Description

@hexu-xu

What happened?

On unmodified master (commit 069766e), DBMS_UTILITY.FORMAT_CALL_STACK labels procedure frames and anonymous DO-block frames as “function”. This makes the call stack misleading when debugging.

What did you expect to happen?

A procedure frame should be labeled “procedure”; an anonymous DO block should be labeled “anonymous block”. Real function frames should continue to be labeled “function”.

I have not verified the exact text against a running Oracle instance. This report concerns IvorySQL identifying the routine kind incorrectly.

How can we reproduce it (as minimally and precisely as possible)?

CREATE OR REPLACE PROCEDURE stack_kind_probe AS
BEGIN
  RAISE INFO '%', DBMS_UTILITY.FORMAT_CALL_STACK;
END;
/
CALL stack_kind_probe();
DROP PROCEDURE stack_kind_probe;

DO $$
BEGIN
  RAISE INFO '%', DBMS_UTILITY.FORMAT_CALL_STACK;
END;
$$;

IvorySQL version

master

Compatible mode

oracle

Server encoding

UTF8

Anything else we need to know?

No response

OS version

Before submitting

  • I confirmed the problem still happens on current master
  • I searched existing issues and found no duplicate

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions