Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10764 PL/SQL parser - Phase 2
  3. MDEV-11058

Put user defined exceptions to the same name space with variables

    Details

    • Type: Technical task
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.3
    • Fix Version/s: None
    • Component/s: Parser
    • Labels:

      Description

      Variables and exceptions are in the same name space. Having a variable and an exception with the same name is not possible in the same scope:

      DROP FUNCTION f1;
      CREATE FUNCTION f1 RETURN VARCHAR
      AS
        e INT:=10;
        e EXCEPTION;
      BEGIN
        RAISE e;
      END;
      /
      SHOW ERRORS;
      

      LINE/COL ERROR
      -------- -----------------------------------------------------------------
      6/3	 PL/SQL: Statement ignored
      6/9	 PLS-00371: at most one declaration for 'E' is permitted
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: