Bug #15880 The use of delimiters when creating procedures.
Submitted: 20 Dec 2005 8:58 Modified: 20 Dec 2005 12:14
Reporter: Andrew Gilfrin Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:5.0+ OS:Any (All)
Assigned to: CPU Architecture:Any

[20 Dec 2005 8:58] Andrew Gilfrin
Description:
When creating procedures, triggers and functions we first need to set the delimiter to something other than ;, while this isn't a huge problem it does mean that you have to either remember what you set it to in the future or set it back after you have created you proc/trigger/function. 

How to repeat:
N/A

Suggested fix:
What about implementing someting like Oracles method where you don't change the delimiter but Oracle knows you are creating something because of the syntax. i.e to create a procedure you need to use the "CREATE PROCEDURE" syntax therefore you know whats comming next is a procedure. Then everything up to the last end; is interpreated as the body of the procedure.
[20 Dec 2005 11:08] Beat Vontobel
Even if it's maybe not an easy thing to solve with the currently used parser and parser setup, I strongly support the feature request. The necessity to change the delimiter makes the distribution of routines and triggers very difficult and error prone in the everyday use of the database. When working in the command line client and "sourcing" *.sql files you always have to remember if the delimiter is being set in the file, if it is set back to semicolon, too - or what delimiter you should set before running the file...