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

Unexpected error on package_body_variable%TYPE inside a package routine

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.11, 12.2, 11.8
    • 12.2
    • Stored routines
    • None
    • Unexpected results

    Description

      This script return an unexpected error:

      SET sql_mode=ORACLE;
      DELIMITER $$
       
      CREATE OR REPLACE PACKAGE pkg1 IS
        PROCEDURE p1;
      END;
      $$
       
      CREATE PACKAGE BODY pkg1 IS
        v0 INT;
        PROCEDURE p1 IS
          v1 v0%TYPE;
        BEGIN
          NULL;
        END;
      END;
      $$
      DELIMITER ;
      

      ERROR 1327 (42000): Undeclared variable: v0
      

      A similar script in Oracle works fine.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:

                Git Integration

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