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

Parenthesized expression does not work as a lower FOR loop bound

    XMLWordPrintable

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

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