[ 
https://issues.apache.org/jira/browse/DERBY-3610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694515#action_12694515
 ] 

Hiranya Jayathilaka commented on DERBY-3610:
--------------------------------------------

I ran some debug sessions and found the cause of the issue. The problem is we 
only have one error message to handle both scenarios (42Y03). We can easily fix 
this by adding two new messages, one for each scenario and making some code 
changes in the PrivilegeNode class. I've already done these changes in my local 
copy and it seems to be working fine. Before I submit a patch I want to know 
the rationale behind the coding scheme used to classify error messages. If I'm 
to add two new messages what are the codes I should use to identify them (for 
the moment I'm using 62Y03 and 72Y03).

Can somebody please shed some light on the subject? 

> Confusing error message when granting execute privilege
> -------------------------------------------------------
>
>                 Key: DERBY-3610
>                 URL: https://issues.apache.org/jira/browse/DERBY-3610
>             Project: Derby
>          Issue Type: Improvement
>          Components: Newcomer, SQL
>            Reporter: Dag H. Wanvik
>            Priority: Trivial
>
> When the wrong keyword is used in a grant execute privilege statement, the 
> error message
> leads one the believe the identifier is neither a procedure or a function, 
> when in deed it is one of the two.
> > create function bc(i int) returns int language java parameter style java 
> > external name 'java.lang.Integer.bitCount' no sql;
> > grant execute on procedure bc to foo;
> ERROR 42Y03: 'BC' is not recognized as a function or procedure.
> > grant execute on function bc to foo;
> (works)
> The reason is that the error message is generic. It would be better to have 
> an error message for each case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to