Page 1 of 1

Access to mysql.proc table before calling stored proc

Posted: Wed 26 Sep 2007 07:54
by photon
I found strange behavior before calling my stored proc - mydac executes following sql statement :
SELECT type, returns, param_list FROM mysql.proc WHERE (name = 'select_data') AND (LOWER(db) = 'gmng'.

And i *must* grant the select privilege to user on mysql.proc table which is actually not *really* required to him (only execution of SP privilige is needed). IMHO this way is not really the right one. Could you please explain such behavior of mydac ? (MySql query browser works ok even only one execution privilege on selected db granted to user).

Posted: Wed 26 Sep 2007 08:48
by Antaeus
This query is executed to obtain the information about the stored procedure parameters from the server. We have already fixed this problem. Since MyDAC 5.00.0.5 information about the stored procedure parameters are obtained from information_schema if it is possible. It is not possible for MySQL 5.0.4 and lower, because they do not have such information in information_schema.

Posted: Wed 26 Sep 2007 09:20
by photon
We have following product versions:
MyDAC - 5.10.0.10
MySql 5.0.45
... and result the same - select from proc ...
So if obtaining of information about the stored procedure parameters from information_schema is not possible ? Will MyDacl ask proc table ?

Posted: Thu 27 Sep 2007 07:21
by Antaeus
The information_schema database does not contain information about routine parameters. MySQL 5.0.5 introduced a possibility to obtain only routines list, but not their parameters like I mentioned in my previous post.
We will consider a possibility to avoid using the mysql database in one of the future builds of MyDAC, like MySQL Query Browser does.