Bug #3339 Stored procedures in nonexistent schemas are uncallable
Submitted: 30 Mar 2004 19:14 Modified: 23 Jul 2004 13:48
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.1-alpha-debug OS:Linux (SuSE 8.2)
Assigned to: Kristofer Pettersson CPU Architecture:Any

[30 Mar 2004 19:14] Peter Gulutzan
Description:
I'm root. I can create a procedure in a schema (i.e. database) that doesn't exist. I can also 
drop it. But I can't call it. 
 

How to repeat:
mysql> create procedure ab.cd () begin end; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> call ab.cd(); 
ERROR 1292 (42000): PROCEDURE cd does not exist 
mysql> show create procedure ab.cd; 
ERROR 1292 (42000): PROCEDURE cd does not exist 
mysql> drop procedure ab.cd; 
Query OK, 0 rows affected (0.00 sec)
[15 Jun 2004 16:00] Per-Erik Martin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html
[23 Jul 2004 1:05] Lenz Grimmer
That bug fix seems to have side effects - I currently get the following test failure in the "sp-error" test:

-------------------------------------------------------
*** r/sp-error.result   Thu Jul 22 19:33:36 2004
--- r/sp-error.reject   Fri Jul 23 02:12:07 2004
***************
*** 396,402 ****
  drop procedure bug3279|
  drop table t3|
  create procedure nodb.bug3339() begin end|
! ERROR 42000: Unknown database 'nodb'
  create procedure bug2653_1(a int, out b int)
  set b = aa|
  create procedure bug2653_2(a int, out b int)
--- 396,402 ----
  drop procedure bug3279|
  drop table t3|
  create procedure nodb.bug3339() begin end|
! ERROR 42000: Unknown database 'k˨'
  create procedure bug2653_1(a int, out b int)
  set b = aa|
  create procedure bug2653_2(a int, out b int)
-------------------------------------------------------

This happened on Solaris, Linux/PPC and HP-UX 11.11. The content of "database name"
seems to differ each time the test is run - looks like random memory to me.
[23 Jul 2004 13:48] Per-Erik Martin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html