COMMENT trouble:
http://bugs.mysql.com/bug.php?id=13823
and
http://bugs.mysql.com/bug.php?id=13934
No feature request (yet?) But then, how long should it a comment be?
I made myself a little utils database in which i store my stuff. This means I have to qualify my procedure calls, but I'm used to that. I'm used to working with oracle packages, so i am always calling a something.someproc(). It does not bother me anymore. In fact, if the names are well chosen, i feel it improves understandability of code.
Is there something against creating a separate database for a single set of related procedures? I guess It would simplify grants too. But yeah, you would get a lot of databases, all with no data, but only with procedures.
In addition to Giuseppes point, there's a slight problem writing procedures that are database independant. Suppose you're running a procedure, and you wnat to know the current database you'd just call....Yep, absolutely nothing at all. the built in functions DATABASE() and the synonym SCHEMA() always return the name of the database wherein the current procedure resides, NOT the current database of the session. (see
http://bugs.mysql.com/bug.php?id=13584 and
http://bugs.mysql.com/bug.php?id=14642)
On the other hand, I can live with very carefully specifying the database to which a call applies. Especially because you can use the SCHEMA() or DATABASE() function in the CALL on the command line, outside of the procedure:
mysql> call util.for_each(database(),'SELECT COUNT(*) FROM');
or someting like that.
BTW, any thoughts on the preferred method of installing stuff? The command line tool strips /* */ and -- comments out of procs (bad, bad bad)
Edited 1 time(s). Last edit at 11/21/2005 08:50AM by Roland Bouman.