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

Can't use SHUTDOWN in stored programs

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.4
    • 10.0.6
    • None
    • None

    Description

      Including SHUTDOWN in events or procedures results in a parse error:

      MariaDB [(none)]> DELIMITER ||
      MariaDB [(none)]> DROP EVENT IF EXISTS `test`.`evt_shutdown`;
          -> CREATE EVENT `test`.`evt_shutdown`
          ->  ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 20 SECOND
          ->  ON COMPLETION PRESERVE
          ->  ENABLE
          -> DO BEGIN
          ->  SHUTDOWN;
          -> END;
          -> ||
      Query OK, 0 rows affected, 1 warning (0.06 sec)
       
      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 ';
      END' at line 6
      MariaDB [(none)]>
      MariaDB [(none)]>
      MariaDB [(none)]>
      MariaDB [(none)]>
      MariaDB [(none)]> SHUTDOWN;
          -> ||
      Query OK, 0 rows affected (4.68 sec)

      Currently, KB doesn't say that shutdown can't be used in stored programs:
      https://kb.askmonty.org/en/shutdown/
      That's why i suppose it is a bug - sorry if it isn't

      Attachments

        Activity

          People

            serg Sergei Golubchik
            f_razzoli Federico Razzoli
            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.