Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10142 PL/SQL parser
  3. MDEV-12107

sql_mode=ORACLE: Inside routines the CALL keywoard is optional

    XMLWordPrintable

Details

    • 10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18

    Description

      Normally, a stored procedure call is done using this syntax:

        CALL p1(10);
        CALL p2;
        CALL test.p1(10);
        CALL test.p2;
      

      However, when we want to call a stored procedure from another routine or an anonymous block, the keyword CALL is optional. We'll fix the parser to understand this syntax.

      Example:

      SET sql_mode=ORACLE;
      DELIMITER /
      CREATE OR REPLACE PROCEDURE p1(a INT) AS
      BEGIN
        NULL;
      END;
      /
      CREATE OR REPLACE PROCEDURE p2 AS
      BEGIN
        NULL;
      END;
      /
      BEGIN
        p1(10);
        p2;
        test.p1(10);
        test.p2(10);
      END;
      /
      

      Attachments

        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.