[MDEV-33428] Error messages ER_PACKAGE_ROUTINE_* are not good enough Created: 2024-02-08  Updated: 2024-02-08

Status: Open
Project: MariaDB Server
Component/s: Stored routines
Affects Version/s: 11.4, 11.5
Fix Version/s: 11.4

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: 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.


Generated at Thu Feb 08 10:38:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.