Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10142 PL/SQL parser
  3. MDEV-10580

sql_mode=ORACLE: FOR loop statement

    XMLWordPrintable

Details

    Description

      Add support for the Oracle-style FOR loop when running in sql_mode=ORACLE

      FOR index IN [ REVERSE ] lower_bound .. upper_bound
      LOOP statements
      END LOOP [ label ] ;
      

      There must be at least one statement.

      The two dots must have no spaces between, otherwise an error is returned:

      BEGIN
        FOR i IN 1 .  . 10 LOOP
          NULL;
        END LOOP;
      END;
      /
      

      ORA-06550: line 2, column 14:
      PLS-00103: Encountered the symbol "." when expecting one of the following:
      * & - + / at mod remainder rem .. <an exponent (**)> ||
      multiset
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 3d
                  3d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 2d Time Not Required
                  2d

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.