Access to mysql.proc table before calling stored proc

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
photon
Posts: 2
Joined: Wed 26 Sep 2007 07:25

Access to mysql.proc table before calling stored proc

Post by photon » Wed 26 Sep 2007 07:54

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).

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 26 Sep 2007 08:48

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.

photon
Posts: 2
Joined: Wed 26 Sep 2007 07:25

Post by photon » Wed 26 Sep 2007 09:20

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 ?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 27 Sep 2007 07:21

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.

Post Reply