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

    • Technical task
    • Status: In Review (View Workflow)
    • Critical
    • Resolution: Unresolved
    • None
    • 11.6
    • Parser, Stored routines
    • None

    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

              serg Sergei Golubchik
              bar Alexander Barkov
              Votes:
              3 Vote for this issue
              Watchers:
              7 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.