Bug #23785 Mysql does not show stored procedures for same user on different db
Submitted: 31 Oct 2006 1:15 Modified: 23 Nov 2008 18:08
Reporter: Robert Gebis Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Administrator Severity:S2 (Serious)
Version:1.2.4Beta OS:MacOS (Mac OSX 10.4.8)
Assigned to: Assigned Account CPU Architecture:Any
Tags: Mysql 5.0.27

[31 Oct 2006 1:15] Robert Gebis
Description:
After creating user 'robert'@'%' with ALL grants for thwo new db (db1 and db2)
I created same procedures in db1 and db2. Doing 
mysql > show procedure status;
I see both stored procs created for both dbs and Definer as robert@%. I can run both of them from command line. But When I start MySQL Administrator and login as root or robert and select 
Catalogs->and then select db1 and than Stored Procedures I see the stored procedure for that db. When I click on db2 and Stored Procedures I do not see any. But again I can see then in console.

Same thing is in MySQL Query Browser 1.2.4b

How to repeat:
Create user name with GRANT All robert@% with password for both new BD (Db1 and DB2)
Now  create that same table in both databases and the same stored procedure.Login as root
using mysql and run
show procedure status;
You will see each stored procedure in each DB
Open MySQL Administrator login as root or robert.
Select each DB in Catalog and click on Stored Procedures Tab.

Suggested fix:
Not sure. I do not have code :) This is on 5.0.27 version
[31 Oct 2006 23:51] Robert Gebis
Same problem in 1.2.5b
[3 Nov 2006 8:35] Domas Mituzas
Robert,

I could not reproduce the issue with 1.2.5rc Administrator and 1.2.5beta Query Browser.

After issuing these commands:
flute:~ midom$ mysql -S /tmp/my.50 -u root

mysql> create database db1;            
mysql> create database db2;
mysql> grant all on db1.* to u@localhost;
mysql> grant all on db2.* to u@localhost;

flute:~ midom$ mysql -S /tmp/my.50 -u u
Server version: 5.0.29-debug-log Source distribution

mysql> use db1;
mysql> create procedure pr () select 1;
mysql> create table t1 (a int);

mysql> use db2;
mysql> create procedure pr () select 1;
mysql> create table t1 (a int);

I could still see everything both in QB and MA. 
Could you please try if such environment would work - new binaries are available for download too.

Also, after you create procedures, could you restart MySQL with --log argument, and attach general query log output, where queries caused by GUI tools would be seen.
[6 Nov 2006 22:14] Robert Gebis
Please check private log in bug 23788
[23 Oct 2008 18:08] Sveta Smirnova
Please provide data requested in bug #23788: they seems to be related and we can not repeat both.
[24 Nov 2008 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".