MySQL Forums
Forum List  »  Stored Procedures

Re: cant use "grant execute on procedure" in functions
Posted by: Per-Erik Martin
Date: January 20, 2006 02:48AM

I think it's a combination of a bug and some confusion. :)

The bug is that the error message is wrong. I get the same message if the procedure does not exist. But there seem to be some other problem as well; if the procedure does exist, I get a completely different error (which indicates a bug).

The confusion is that you're using a variable as the user name in the GRANT. It doesn't work, it's interpeted as the username 'un'.

Another question is why you're using a function? Functions are for use in expressions (where you want a return value), and this doesn't look like something you would want to do in an expression. It should probably be a procedure.
(I'm not at all sure that GRANT should be allowed in a function, so this might be a bug as well.)

pem, Senior Software Dev., MySQL AB

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: cant use "grant execute on procedure" in functions
1294
January 20, 2006 02:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.