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

    • Sprint:
      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

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

              Dates

              Created:
              Updated:
              Resolved: