Details

    • Sprint:
      10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18

      Description

      In addition to FOR loops on explicitly declared cursors (MDEV-10581), we'll implement FOR loops for implicit cursors.

      The SQL query for the implicit cursor is declared directly inside the FOR loop:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a INT, b INT);
      INSERT INTO t1 VALUES (10,20);
       
      DROP PROCEDURE IF EXISTS p1;
      DELIMITER /
      CREATE PROCEDURE p1 AS 
      BEGIN
        FOR rec IN (SELECT a, b FROM t1)
        LOOP
          SELECT rec.a, rec.b;
        END LOOP;
      END;
      /
      DELIMITER ;
      CALL p1();
      

        Attachments

          Issue Links

            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: