Bug #29268 Documentation is incomplete: limitations of stored procedures
Submitted: 21 Jun 2007 13:53 Modified: 22 Jun 2007 19:51
Reporter: Konstantin Osipov (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Jon Stephens CPU Architecture:Any

[21 Jun 2007 13:53] Konstantin Osipov
Description:
MySQL manual is incomplete when mentions limitations of stored procedures.

http://dev.mysql.com/doc/refman/5.1/en/routine-restrictions.html
says:

 Stored routines cannot contain arbitrary SQL statements. The following statements are disallowed:

    * The locking statements LOCK TABLES, UNLOCK TABLES.
    * LOAD DATA and LOAD TABLE. 

This list is incomplete.

It is missing:
CREATE FUNCTION, ALTER FUNCTION, DROP FUNCTION, CREATE PROCEDURE, ALTER PROCEDURE , DROP PROCEDURE, CREATE EVENT, DROP EVENT, ALTER EVENT, HANDLER [OPEN/CLOSE/FETCH], CREATE TRIGGER, ALTER TRIGGER, DROP TRIGGER, HELP, USE.
Generally, any statement that is disallowed as a prepared statement is also disallowed inside a stored procedure.

How to repeat:
Fix the manual.
Cross-link limitations of Events with limitations of stored programs.
Cross-link limitations of prepared statements (which is missing completely)
with limitations of stored programs.
[22 Jun 2007 19:51] Jon Stephens
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.
[23 Jun 2007 15:45] Jon Stephens
We'll implement a long-term solution as WL#3938.