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

ROW data type for stored function return values

    XMLWordPrintable

Details

    Description

      The task MDEV-10914 implements the ROW data type for stored routine local variables and parameters.

      This task will additionally allow to use ROW in stored function return data type.

      DROP FUNCTION IF EXISTS f1;
      DELIMITER $$
      CREATE FUNCTION f1(a INT, b VARCHAR(32)) RETURNS ROW(a INT, b VARCHAR(32))
      BEGIN
        RETURN ROW(a,b);
      END;
      $$
      DELIMITER ;
      SELECT f1(1,'b1') = ROW(1,'b1');
      

      Anchored row data types should also be supported:

      DROP FUNCTION IF EXISTS f1;
      DELIMITER $$
      CREATE FUNCTION f1(a INT, b VARCHAR(32)) RETURNS ROW TYPE OF t1
      BEGIN
        RETURN ROW(a,b);
      END;
      $$
      DELIMITER ;
      SELECT f1(1,'b1') = ROW(1,'b1');
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              4 Vote for this issue
              Watchers:
              10 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.