Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Bug Parameters Are Not Listed For My Custom Function

forums forums SQLyog SQLyog: Bugs / Feature Requests Bug Parameters Are Not Listed For My Custom Function

  • This topic is empty.
Viewing 10 reply threads
  • Author
    Posts
    • #12427
      Pentium10
      Member

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

      Please fix them ASAP.

      http://screencast.com/t/HESSnFDoyOM

    • #32560
      peterlaursen
      Participant

      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.

    • #32561
      Pentium10
      Member
      'peterlaursen' wrote:

      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/doc/refman/5.5/en/parameters-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.

    • #32562
      peterlaursen
      Participant

      The request is OK. Now understood. But priority is probably low.

    • #32563
      Pentium10
      Member

      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/doc/refman/5.5/en/parameters-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.com/books?id=6tJAdlzjFJ0C&pg=PA823&lpg=PA823&dq=procs_priv&source=bl&ots=1i9l0rakXw&sig=bKS6Fq6mk2OETkKjsvoteUgD64g&hl=en&ei=aC9MTuidN8rt-gbd0MGWCQ&sa=X&oi=book_result&ct=result&resnum=10&ved=0CF0Q6AEwCQ#v=onepage&q=procs_priv&f=false

    • #32564
      peterlaursen
      Participant

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

      Refer http://dev.mysql.com/doc/refman/5.1/en/adding-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.

    • #32565
      Pentium10
      Member

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

    • #32566
      peterlaursen
      Participant
    • #32567
      kanga77
      Member

      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.

    • #32568
      vishal.pr
      Member

      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.com/p/sqlyog/issues/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.com/p/sqlyog/issues/detail?id=1788 . We will check what we can do here and prioritize accordingly.

      Regards,

      Vishal P.R

    • #32569
      number_one
      Participant

      I’m using v12.12 and am not able to get stored procedure parameters to show in autocomplete.  Has there been a regression?  I’ve refreshed the object view and made sure the active database is the one with the procedure in question.

Viewing 10 reply threads
  • You must be logged in to reply to this topic.