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

Parenthesized expression does not work as a lower FOR loop bound

    Details

      Description

      This script works fine in Oracle:

      BEGIN
      FOR i IN (1)..(2)
      LOOP
        NULL;
      END LOOP;
      END;
      /
      

      An equivalent script in MariaDB fails on error:

      SET sql_mode=ORACLE;
      DELIMITER /
      BEGIN
      FOR i IN (1)..(2)
      LOOP
        NULL;
      END LOOP;
      END;
      /
      

      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1)..(2)
      

        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: