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

            bar Alexander Barkov created issue -
            bar Alexander Barkov made changes -
            Field Original Value New Value
            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.

            {code:sql}
            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');
            SELECT f1(1,'b1').a;
            {code}

            The last query will probably need serious grammar change to support field names after parentheses, e.g. {{f1(1,'b1').a}}.
            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.

            {code:sql}
            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');
            SELECT f1(1,'b1').a;
            {code}

            The last query will probably need serious grammar change to support field names after parentheses, e.g. {{f1(1,'b1').a}}.
            bar Alexander Barkov made changes -
            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.

            {code:sql}
            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');
            SELECT f1(1,'b1').a;
            {code}

            The last query will probably need serious grammar change to support field names after parentheses, e.g. {{f1(1,'b1').a}}.
            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.

            {code:sql}
            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');
            SELECT f1(1,'b1').a;
            {code}

            The last query will probably need serious grammar changes to support field names after parentheses, e.g. {{f1(1,'b1').a}}.
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            serg Sergei Golubchik made changes -
            Fix Version/s 10.3 [ 22126 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Assignee Alexander Barkov [ bar ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 79959 ] MariaDB v4 [ 140248 ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ]
            Status Open [ 1 ] Needs Feedback [ 10501 ]
            bar Alexander Barkov made changes -
            Fix Version/s N/A [ 14700 ]
            Resolution Incomplete [ 4 ]
            Status Needs Feedback [ 10501 ] Closed [ 6 ]
            bar Alexander Barkov made changes -
            Resolution Incomplete [ 4 ]
            Status Closed [ 6 ] Stalled [ 10000 ]
            bar Alexander Barkov made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            bar Alexander Barkov made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Fix Version/s 11.4 [ 29301 ]
            Fix Version/s N/A [ 14700 ]
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ] Sergei Golubchik [ serg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            bar Alexander Barkov made changes -
            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.

            {code:sql}
            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');
            SELECT f1(1,'b1').a;
            {code}

            The last query will probably need serious grammar changes to support field names after parentheses, e.g. {{f1(1,'b1').a}}.
            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.

            {code:sql}
            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');
            {code}
            serg Sergei Golubchik made changes -
            Fix Version/s 11.5 [ 29506 ]
            Fix Version/s 11.4 [ 29301 ]
            bradlanier Brad Lanier made changes -
            Comment [ Please also allow all stored routines to accept the FULL ROW type, not just the individual row fields.
            Example:
            DROP FUNCTION IF EXISTS f2;
            DELIMITER $$
            CREATE FUNCTION f2(rin ROW(a INT, b VARCHAR(32)) RETURNS ROW(a INT, b VARCHAR(32))
               BEGIN
                  RETURN ROW(rin.a, rin.b);
               END;
            $$
            DELIMITER ;

            from within another stored routine:
            DECLARE rtest ROW(a INT, b VARCHAR(32));
            rtest.a := 1;
            rtest.b := 'b1';
            SELECT f2(rtest) = ROW(1,'b1');

            This will allow functions/procedures intended to be called only by other functions/procedures to accept one row parameter instead of many individual parameters.
            ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            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.

            {code:sql}
            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');
            {code}
            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.

            {code:sql}
            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');
            {code}

            Anchored row data types should also be supported:
            {code:sql}
            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');
            {code}
            serg Sergei Golubchik made changes -
            Fix Version/s 11.6 [ 29515 ]
            Fix Version/s 11.5 [ 29506 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 11.7 [ 29815 ]
            Fix Version/s 11.6 [ 29515 ]
            Priority Critical [ 2 ] Major [ 3 ]
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Alexander Barkov [ bar ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ] Sergei Golubchik [ serg ]
            Status Stalled [ 10000 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Alexander Barkov [ bar ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ] Elena Stepanova [ elenst ]
            bar Alexander Barkov made changes -
            Status Stalled [ 10000 ] In Testing [ 10301 ]
            elenst Elena Stepanova made changes -
            Assignee Elena Stepanova [ elenst ] Ramesh Sivaraman [ JIRAUSER48189 ]
            serg Sergei Golubchik made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            Labels Preview_11.7
            ramesh Ramesh Sivaraman made changes -
            ramesh Ramesh Sivaraman made changes -
            Assignee Ramesh Sivaraman [ JIRAUSER48189 ] Alexander Barkov [ bar ]
            Status In Testing [ 10301 ] Stalled [ 10000 ]
            bar Alexander Barkov made changes -
            Fix Version/s 11.7.1 [ 29913 ]
            Fix Version/s 11.7 [ 29815 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            bar Alexander Barkov made changes -

            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.