Jump to content


Photo

Bug Parameters Are Not Listed For My Custom Function


  • Please log in to reply
9 replies to this topic

#1 Pentium10

Pentium10

    Member

  • Members
  • PipPip
  • 21 posts

Posted 17 August 2011 - 03:31 PM

When I use my custom function in the editor the parameters are not listed

Please fix them ASAP.

http://screencast.com/t/HESSnFDoyOM

#2 peterlaursen

peterlaursen

    Advanced Member

  • Admin
  • PipPipPip
  • 7,869 posts
  • Gender:Male
  • Location:Skagen, Denmark
  • Interests:well ... jazz/folk music, photography, chess, nature, ecology, history, bicycling, Highland Malts ... well, Lowland Malts and Cognac too actually :-) just wonder how I get the time to touch a computer! SQLyog and MONyog? no that's not interest, that's BASIC NEEDS simply!

Posted 17 August 2011 - 08:15 PM

We never promised this! Autocomplete supports MySQL built-in functions, but not UDF's nor Stored Functions etc..

This observation/request is OK, but I tell that is very little chance that this will be changed. I)t would be very expensive and involves passing SHOW CREATE FUNTCION for each Stored Function at connection time.
Computers make your grey hair come off ....

Peter Laursen
Webyog

#3 Pentium10

Pentium10

    Member

  • Members
  • PipPip
  • 21 posts

Posted 17 August 2011 - 08:21 PM

We never promised this! Autocomplete supports MySQL built-in functions, but not UDF's nor Stored Functions etc..

This observation/request is OK, but I tell that is very little chance that this will be changed. I)t would be very expensive and involves passing SHOW CREATE FUNTCION for each Stored Function at connection time.



You are already fetching the function name to list the Object browser at beginning. At that time you would need to run a thread to get also the parameters name from the information schema.
http://dev.mysql.com...ters-table.html

This would add tremendous value to SQLYog and certain apps have this functionality, so I think it's time to implement it.

We bought today Ultimate SQLYog today mainly for this purpose, and we see missing stuff.

#4 peterlaursen

peterlaursen

    Advanced Member

  • Admin
  • PipPipPip
  • 7,869 posts
  • Gender:Male
  • Location:Skagen, Denmark
  • Interests:well ... jazz/folk music, photography, chess, nature, ecology, history, bicycling, Highland Malts ... well, Lowland Malts and Cognac too actually :-) just wonder how I get the time to touch a computer! SQLyog and MONyog? no that's not interest, that's BASIC NEEDS simply!

Posted 17 August 2011 - 08:57 PM

The request is OK. Now understood. But priority is probably low.
Computers make your grey hair come off ....

Peter Laursen
Webyog

#5 Pentium10

Pentium10

    Member

  • Members
  • PipPip
  • 21 posts

Posted 17 August 2011 - 09:19 PM

You have a couple of ways to get the UDF parameters:

1. For MySQL 5.5 use the new information_schema.PARAMETERS table
http://dev.mysql.com...ters-table.html

2. For older version when you have access to database `mysql` use `mysql`.`proc` table:
select name,param_list from `mysql`.`proc`; // this returns all parameters for procedure/function for ALL databases (you don't need to query separately for database, you query once for server

there is also a `mysql`.`procs_priv` that you need to use.

Read page: 823+ from here:
Beginning PHP and MySQL: from novice to professional By W. Jason Gilmore

http://books.google....cs_priv&f=false

#6 peterlaursen

peterlaursen

    Advanced Member

  • Admin
  • PipPipPip
  • 7,869 posts
  • Gender:Male
  • Location:Skagen, Denmark
  • Interests:well ... jazz/folk music, photography, chess, nature, ecology, history, bicycling, Highland Malts ... well, Lowland Malts and Cognac too actually :-) just wonder how I get the time to touch a computer! SQLyog and MONyog? no that's not interest, that's BASIC NEEDS simply!

Posted 18 August 2011 - 07:36 AM

I think you are using wrong terminology. You write 'User defined functions' and not 'Stored Functions'. Am I right?

Refer http://dev.mysql.com...-functions.html

(but I am not quite sure if/how UDF's are exposed. But they are also less important than Stored Routines.




You are right that with MySQL 5.5+ this can be done from a single I_S table without concerns about privileges, and without parsing. We may consider to add this for MySQL 5.5+ only.


Computers make your grey hair come off ....

Peter Laursen
Webyog

#7 Pentium10

Pentium10

    Member

  • Members
  • PipPip
  • 21 posts

Posted 18 August 2011 - 07:40 AM

Sorry I was using the wrong terminology. I meant Stored Procedures/Functions.

#8 peterlaursen

peterlaursen

    Advanced Member

  • Admin
  • PipPipPip
  • 7,869 posts
  • Gender:Male
  • Location:Skagen, Denmark
  • Interests:well ... jazz/folk music, photography, chess, nature, ecology, history, bicycling, Highland Malts ... well, Lowland Malts and Cognac too actually :-) just wonder how I get the time to touch a computer! SQLyog and MONyog? no that's not interest, that's BASIC NEEDS simply!

Posted 18 August 2011 - 09:23 AM

I have added this here: http://code.google.c.../detail?id=1685
Computers make your grey hair come off ....

Peter Laursen
Webyog

#9 kanga77

kanga77

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 29 April 2012 - 08:04 PM

Hi

"We never promised this! Autocomplete supports MySQL built-in functions, but not UDF's nor Stored Functions etc.."

Has this now been rectified? I am using the Enterprise version (I downloaded version 9.6 earlier today) and neither the name nor the parameters of my User Defined Functions appear in auto-complete (I have tried rebuilding the tag files and this doesn't have any effect).

This results in my having to open the UDF to check its parameters each time I want to write a "SELECT...." statement using it. This is quite frustrating, to be honest, and is one of the only issues I have with what is an excellent product. If it is not yet available, can I suggest you make it a higher priority than you appear to do so above, given that:

- UDFs are very important to developers; and
- most other code editors (Eclipse, Notepad ++ etc) include this functionality... for free.

Thanks in advance for your help

Regards

Tim.

#10 vishal.pr

vishal.pr

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • Gender:Male
  • Location:Bangalore

Posted 30 April 2012 - 06:51 PM

Hello Tim,

Are you sure you are refering to User Defined Functions and not Stored Functions?
  • If you are refering to Stored Functions, then we had a report here http://code.google.c.../detail?id=1685 and was fixed in version 9.5. Please make sure that you are using either the fully qualified name of the function or the function is in the active database (the one selected in object browser). It should work then. If not, please provide a reproducible test case so that we can check this at our end.
  • If you are refering to User Defined Functions itself, then sorry autocomplete currently dont support them. I have added this to our issue tracker as a feature request. Refer to http://code.google.c.../detail?id=1788 . We will check what we can do here and prioritize accordingly.

Regards,
Vishal P.R




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users