Bug #36333 Object services can't be used inside stored routines.
Submitted: 25 Apr 2008 7:39 Modified: 28 Apr 2008 12:24
Reporter: Rafal Somla Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S4 (Feature request)
Version:6.0 OS:Any
Assigned to: CPU Architecture:Any
Triage: Triaged: D5 (Feature request) / R3 (Medium) / E3 (Medium)

[25 Apr 2008 7:39] Rafal Somla
Description:
It is not possible to use server object services (si_objects) from inside stored routines. This is because methods creating objects are implemented by executing appropriate CREATE statement, passed to mysql_parse() function. But mysql_parse() can not be called from within a stored routine, which is guarded by assertions in the code (see also BUG#33567).

Because of the above, BACKUP and RESTORE commands, which use object services, can not be used inside stored routines. We would be able to remove this limitation when this bug is fixed.

Note: When fixing this bug, make sure that the services can also be used inside events and triggers.

How to repeat:
Code inspection (sql/si_objects.cc).
[17 Jul 2008 10:09] Rafal Somla
The reference to BUG#33567 above is incorrect - it should be BUG#33563.