Bug #14835 Executing C# program requires privileges wheras server doesn't
Submitted: 10 Nov 2005 15:38 Modified: 2 Dec 2005 10:06
Reporter: Markus Popp Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:1.0.5/MySQL 5.0.15 OS:Windows (Windows)
Assigned to: Assigned Account CPU Architecture:Any

[10 Nov 2005 15:38] Markus Popp
Description:
Executing the attached C# program I get an SQL exception asking for select privileges in the mysql.proc table wheras the server doesn't it require it when the stored procedure is called e.g. from the MySQL monitor.

The exception in the C# program says:

Exception trying to retrieve parameter info for testProc: #42000SELECT command denied to user 'user'@'localhost' for table 'proc'

This bug report adds to bug report #14834 and uses the same data.

How to repeat:
Calling the stored procedure from the MySQL monitor works fine:

E:\>mysql -u user
Enter password: ****
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 44 to server version: 5.0.15-nt-max

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mpopp_test
Database changed
mysql> call testProc(5, @a);
+-------------------+
| multiply          |
+-------------------+
| 5 times two is 10 |
+-------------------+
1 row in set (0.00 sec)

+----------------------------+
| divide                     |
+----------------------------+
| 5 divided by two is 2.5000 |
+----------------------------+
1 row in set (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

mysql> select @a;
+------+
| @a   |
+------+
| 25   |
+------+
1 row in set (0.00 sec)

mysql>
[15 Nov 2005 20:18] Vasily Kishkin
I was able to reproduce the bug from your test case and I've got the follow error message:

An unhandled exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in mysql.data.dll

Additional information: Exception trying to retrieve parameter info for testProc: #42000SELECT command denied to user 'user'@'localhost' for table 'proc'

I tested on 1.0.6.
[15 Nov 2005 20:39] Vasily Kishkin
I need answer on bug 14836.
[29 Nov 2005 14:13] Markus Popp
Change it back to 'open'.
[2 Dec 2005 10:06] Vasily Kishkin
See bug http://bugs.mysql.com/bug.php?id=14836
[26 May 2006 4:24] Mark Johnson
see also:
http://bugs.mysql.com/bug.php?id=10640