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

sql_mode=ORACLE: fully qualified package function calls do not work: db.pkg.func()

    XMLWordPrintable

    Details

      Description

      MariaDB supports only 2-part qualified names in the package function call syntax:

      SET sql_mode=ORACLE;
      DELIMITER $$
      CREATE OR REPLACE PACKAGE pkg1 AS
        FUNCTION f1 RETURN TEXT;
      END;
      $$
      CREATE PACKAGE BODY pkg1
      AS
        FUNCTION f1 RETURN TEXT IS
        BEGIN
          RETURN 'Here';
        END;
      END;
      $$
      DELIMITER ;
      SELECT pkg1.f1();
      

      +-----------+
      | pkg1.f1() |
      +-----------+
      | Here      |
      +-----------+
      

      So far so good.

      But fully qualified (i.e. including database name) calls do not work:

      SELECT test.pkg1.f1();
      

      ERROR 1064 (42000): You have an error in your SQL syntax ... near '()' at line 1
      

      This should be fixed. This problem is a blocker for MDEV-19328.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              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.