Bug #2269 Lost connect if stored procedure called before USE
Submitted: 3 Jan 2004 9:40 Modified: 9 Jan 2004 0:44
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.0 OS:Linux (SuSE 8.2)
Assigned to: Bugs System CPU Architecture:Any

[3 Jan 2004 9:40] Peter Gulutzan
Description:
A stsored procedure contains an unqualified table name. Start a session without saying 
USE. Call the procedure. Call it again. The connection gets lost. 
 

How to repeat:
 
pgulutzan@aijj42nay42q9:~> /usr/local/mysql/bin/mysql --user=root 
Welcome to the MySQL monitor.  Commands end with ; or \g. 
Your MySQL connection id is 20 to server version: 5.0.0-alpha-debug 
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 
 
mysql> create procedure p20 () select * from t11; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> call p20(); 
ERROR 1046 (3D000): No Database Selected 
mysql> call p20(); 
Packets out of order (Found: 2, expected 1) 
ERROR 2013 (HY000): Lost connection to MySQL server during query
[5 Jan 2004 3:01] Alexander Keremidarski
mysql> call bug2269();
ERROR 1046 (3D000): No Database Selected
mysql> call bug2269();
Packets out of order (Found: 2, expected 1)
ERROR 2013 (HY000): Lost connection to MySQL server during query
[9 Jan 2004 0:44] 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