Bug #3229 Stored procedure comment causes packets out of order
Submitted: 18 Mar 2004 12:13 Modified: 8 Jun 2004 18:55
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.1-alpha-debug OS:Linux (SuSE 8.2)
Assigned to: Bugs System CPU Architecture:Any

[18 Mar 2004 12:13] Peter Gulutzan
Description:
After I create a stored procedure that has a comment that has a ' in it, SHOW CREATE 
PROCEDURE stops working and soon causes severe errors. 
 

How to repeat:
mysql> create procedure p () comment 'Joe''s procedure' begin end; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> show create procedure p ; 
ERROR 1064 (42000): You have an error in your SQL syntax.  Check the manual that 
corresponds to your MySQL server version for the right syntax to use near 'procedure' 
begin end' at line 2 
mysql> show create procedure p ; 
Packets out of order (Found: 2, expected 1) 
ERROR 2013 (HY000): Lost connection to MySQL server during query
[8 Jun 2004 18:55] Per-Erik Martin
Although it is not completely fixed yet, I'll close this.
The remaining part is actually an instance of
BUG#2564: SHOW CREATE inconsistent W.R.T ANSI_QUOTES.
(The fact that the comment is not properly quoted causes
an unexpected error.)