by Mr Query » Mon May 23, 2016 9:19 am
Being able to change the delimiter in the settings does not solve the issue in MySQL/MariaDB scripts. For the definition of a procedure or function, you need to be able to set the delimiter within the script, as in the example earlier in this thread.
Our SQL code is repeatable (meaning that you can run it over an existing database or over a new one, and it will make sure it gets into the desired state). To achieve this, table creation statements use the "IF NOT EXISTS" clause and later changes, like adding new columns, are put in stored procedures after the table create statements. An example can be found at (this page describes how to build modular, repeatable scripts in MySQL).
These scripts can be run with the MySQL command-line client and with some database front-ends, like SQLYog.
The DELIMITER statement is in MySQL a bit of an odd statement: it is not an SQL statement but a directive in the MySQL command-line client. But some database front-ends do support it, because it is the only way I know of to get a procedure definition to the server. So the feature request is to be able to change the delimiter from the script, so we can run scripts from the database front-end like we do from the MySQL command-line client.