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

sql_mode=ORACLE: Keyword ELSEIF should not be reserved

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3(EOL)
    • 10.3.11
    • Parser
    • None

    Description

      The keyword ELSEIF does not have a special meaning on Oracle. These scripts work fine on Oracle:

      DECLARE
        ELSEIF INT;
      BEGIN
        ELSEIF:=1;
      END;
      /
      

      BEGIN
      <<ELSEIF>>
        NULL;
      END;
      /
      

      Equivalent MariaDB scripts produce systax errors:

      SET sql_mode=ORACLE;
      DELIMITER /
      DECLARE
        ELSEIF INT;
      BEGIN
        ELSEIF:=1;
      END;
      /
      DELIMITER ;
      

      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 'ELSEIF INT;...
      

      SET sql_mode=ORACLE;
      DELIMITER /
      BEGIN
      <<ELSEIF>>
        NULL;
      END;
      /
      DELIMITER ;
      

      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 'ELSEIF>>
      

      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:
                Resolved:

                Git Integration

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