i am not permited to view my functions

[expired user #6795]'s profile image [expired user #6795] posted 11 years ago in General Permalink
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
ansgar's profile image ansgar posted 11 years ago Permalink
> it then says i'm not permuted to view it

When exactly does "it" say that?
[expired user #6795]'s profile image [expired user #6795] posted 11 years ago Permalink
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'





jfalch's profile image jfalch posted 11 years ago Permalink
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 ?
[expired user #6795]'s profile image [expired user #6795] posted 11 years ago Permalink
click the blue icon play i usually do that
or right click run selection when needed 'rare condition'
[expired user #6795]'s profile image [expired user #6795] posted 11 years ago Permalink
https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-ash3/812782_10151327861875326_308815839_o.jpg
[expired user #6795]'s profile image [expired user #6795] posted 11 years ago Permalink
no error i just can't edit it as usual
ansgar's profile image ansgar posted 11 years ago Permalink
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.
ansgar's profile image ansgar posted 11 years ago Permalink
Oh this is tricky to fix. I recently fixed another bug and opened this one instead.
[expired user #6795]'s profile image [expired user #6795] posted 11 years ago Permalink
That fixed the issue Thank you smile
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 .
ansgar's profile image ansgar posted 11 years ago Permalink
Should be fixed in r4326. information_schema.ROUTINES.ROUTINE_DEFINITION is asked as an alternative way now.
ansgar's profile image ansgar posted 11 years ago Permalink
That means - you should now be able to leave the BEGIN..END block away, should work with or without these.
[expired user #6795]'s profile image [expired user #6795] posted 11 years ago Permalink
i updated it and now it works as expected i'm very happy

Please login to leave a reply, or register at first.