i log in as root
i create a one line function
it then says i'm not permuted to view it
i can execute show create function
i am not permited to view my functions
ok i connect 'very typically'
i go to query tab
i type
create function fn_df(d date) returns varchar(20) return date_format(d,'%d/%b/%Y')
i go to the DBs pane refresh on functions group click the func open the function on the right next to the buttons
help, discard and save 'you have no privileges to view this routine'
i go to query tab
i type
create function fn_df(d date) returns varchar(20) return date_format(d,'%d/%b/%Y')
i go to the DBs pane refresh on functions group click the func open the function on the right next to the buttons
help, discard and save 'you have no privileges to view this routine'
after writing the above "create function" statement, did you execute it ? ("Run" from query pane context menu, or F9)
just curious..
then, assuming that your last sentence means "click the func >will< open the function on the right next to the buttons ..." what happens before the error message ? what exactly happens when you click the function name ? screenshot ?
just curious..
then, assuming that your last sentence means "click the func >will< open the function on the right next to the buttons ..." what happens before the error message ? what exactly happens when you click the function name ? screenshot ?
Ah, got it. HeidiSQL assumes a privilege error when the body of the routine is empty. It is not really empty in your case, but it is not surrounded by a BEGIN...END, which HeidiSQL expects. So, it turns out as a bug in HeidiSQL. Please try to confirm that, by adding the mentioned BEGIN/END.
Oh this is tricky to fix. I recently fixed another bug and opened this one instead.
Code modification/commit
from ansgar.becker,
11 years ago,
revision 7.0.0.4326
Work around empty body detected in ParseRoutineBody, and get it from information_schema.ROUTINES in that case. See http://www.heidisql.com/forum.php?t=12075 .
Please login to leave a reply, or register at first.