Description:
The mysql command line client tool discards comments before sending the command to the server.
This behaviour is very undesirable when creating stored routines (procedures, functions, triggers, events). Meaningful implementation notes inserted inside the code is lost for no good reason.
Please create an option (--retain-comments or so) to allow the entire statement (including the comments )to be sent to the server.
The GUI tools, i.e. Query Browser and Administrator do send comments to the server, and these are then retained as the server has no problem in storing them
How to repeat:
mysql> CREATE PROCEDURE p()
-> BEGIN
-> /******************
/*> * A simple procedure
/*> *******************/
-> SELECT version();
-> SELECT schema();
-> END;
-> $$
mysql> SELECT routine_definition
-> FROM information_schema.routines
-> WHERE routine_schema = schema()
-> AND routine_name = 'p'
-> ;
+-------------------------------------------------------+
| routine_definition |
+-------------------------------------------------------+
| BEGIN
SELECT version();
SELECT schema();
END |
+-------------------------------------------------------+
1 row in set (0.01 sec)
mysql>
Suggested fix:
send comments to the server please.