Bug #46307 lambda style routines
Submitted: 20 Jul 2009 12:58 Modified: 22 Sep 2009 13:20
Reporter: Scott Noyes Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[20 Jul 2009 12:58] Scott Noyes
Description:
Add support for lambda-style procedures and functions, so that a .sql file could contain something like this:

@sql := CREATE PROCREDURE () BEGIN IF x = 1 THEN TRUNCATE TABLE y; END IF; END//
CALL @sql;

This way, we can have one-off procedures, without having to create them in some database.

We could improve mysql_upgrade this way to better verify the privilege tables have the proper structure.

How to repeat:
see description

Suggested fix:
see description
[20 Jul 2009 16:54] Valeriy Kravchuk
Maybe we should just support CREATE PROCEDURE (not only CALL) as server-side prepared statement?
[20 Aug 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[21 Sep 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[22 Sep 2009 12:04] MySQL Verification Team
Valeriy's suggestion would suffice.
[22 Sep 2009 13:53] Konstantin Osipov
Scott, I think it's an excellent idea. It will be on my list of personal projects to look at.
[29 Sep 2009 12:45] Valeriy Kravchuk
Bug #15233 was marked as a duplicate of this one.