[MDEV-4931] Can't use SHUTDOWN in stored programs Created: 2013-08-21  Updated: 2013-11-10  Resolved: 2013-11-10

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.4
Fix Version/s: 10.0.6

Type: Bug Priority: Minor
Reporter: Federico Razzoli Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: 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


Generated at Thu Feb 08 07:00:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.