Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33428

Error messages ER_PACKAGE_ROUTINE_* are not good enough

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 11.4, 11.5
    • 11.4.2
    • Stored routines
    • None

    Description

      MariaDB has the following messages:

      ER_PACKAGE_ROUTINE_IN_SPEC_NOT_DEFINED_IN_BODY
              eng "Subroutine '%-.192s' is declared in the package specification but is not defined in the package body"
       
      ER_PACKAGE_ROUTINE_FORWARD_DECLARATION_NOT_DEFINED
              eng "Subroutine '%-.192s' has a forward declaration but is not defined"
      

      They resemble similar messages in the Oracle database:

      PLS-00323: subprogram or cursor 'name' is declared in a
      package specification and must be defined in the package body
       
      PLS-00328: A subprogram body must be defined for the forward declaration of 'name'.
      

      However, the words "subroutine" and "subprogram" are not in the SQL Standard (at least in stored routines context), it's better to avoid the non-standard terminology.

      Also, it's not clear an object of which type (PROCEDURE or FUNCTION) has the problem.

      It'll be more clear if the object type is printed explicitly, e.g.:

      PROCEDURE 'p1' is declared in the package specification but is not defined in the package body
              
      FUNCTION 'f1' has a forward declaration but is not defined
      

      These messages will need new formats in errmgs-utf8.txt.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.