Bug #34679 | Grant Privileges in Stored Procedures | ||
---|---|---|---|
Submitted: | 19 Feb 2008 22:42 | Modified: | 20 Mar 2008 13:09 |
Reporter: | Camilo Torregroza | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.45-community-nt | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | privileges, stored procedures |
[19 Feb 2008 22:42]
Camilo Torregroza
[20 Feb 2008 9:21]
todiff wu
Hello Camilo, Please clarify your login and execution steps a little more and would better upload result of your SELECT * FROM mysql.user before running the procedure as well. Normally Statements not allowed in SQL prepared statements are generally also not permitted in stored routines, GRANT is one of them, can’t pass parameters to such statement. http://dev.mysql.com/doc/refman/5.0/en/sqlps.html So your goal can be matched by replace the kindred statements ” GRANT EXECUTE ON PROCEDURE `tesgestiontigo_dbo`.`formas_GetAllDependencias` TO Usuario;” with such a statement “insert into mysql.procs_priv values ('localhost',' tesgestiontigo_dbo ',Usuario,' formas_GetAllDependencias ','PROCEDURE','root@localhost','Execute',now());” Then the value of parameter Usuario can be passed to the statement and grants proper privilege to users you want.
[20 Feb 2008 13:09]
MySQL Verification Team
Setting to feedback according last request.
[21 Mar 2008 0: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".