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

Improve error handling when a function-method/procedure-method is missing in stored routines

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • N/A
    • Stored routines
    • None
    • Not for Release Notes
    • Q3/2025 Maintenance

    Description

      Improve error handling when a function-method/procedure--method is missing in stored routines. Current error message is confusing to identify the exact reason of the error.

      12.1.0-dbg>DELIMITER $$
      12.1.0-dbg>DECLARE
          ->   TYPE marks_t IS TABLE OF NUMBER INDEX BY INTEGER;
          ->   marks marks_t;
          -> BEGIN
          ->   marks(0) := 62;
          ->   SELECT marks.DELETE(0);
          -> END;
          -> $$
      ERROR 1054 (42S22): Unknown column 'marks' in 'DELETE'
      12.1.0-dbg>DELIMITER ;
      

      12.1.0-dbg>SET sql_mode=ORACLE;
      Query OK, 0 rows affected (0.001 sec)
       
      12.1.0-dbg>DELIMITER $$
      12.1.0-dbg>DECLARE
          ->   TYPE marks_t IS TABLE OF NUMBER INDEX BY INTEGER;
          ->   marks marks_t;
          -> BEGIN
          ->   marks.delete1(); -- method-procedure call
          -> END;
          -> $$
      ERROR 1054 (42S22): Unknown column 'marks' in 'delete1'
      12.1.0-dbg>DELIMITER ;
      12.1.0-dbg>
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              ramesh Ramesh Sivaraman
              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.