Bug #5959 Stored procedure packet error if non-break space
Submitted: 7 Oct 2004 17:45 Modified: 18 Mar 2005 15:38
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.2-alpha-debug OS:Linux (SuSE 8.2)
Assigned to: Bugs System CPU Architecture:Any

[7 Oct 2004 17:45] Peter Gulutzan
Description:
A function definition that contains 
the latin-1 punctuation mark 
NO-BREAK SPACE (hexadecimal A0 in 
8859-1 character set) has failures 
and eventually "packets out of order". 
 
 

How to repeat:
mysql> use test; 
Database changed 
mysql> create function fx () returns int   return 5; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> select fx(); 
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 '? 
return 5' at line 1 
mysql> select fx(); 
Packets out of order (Found: 2, expected 1) 
ERROR 2013 (HY000): Lost connection to MySQL server during query 
 
====== 
 
Unfortunately NO-BREAK SPACE gets 
lost when I cut and paste, so I'll 
attach a file. In the file the character 
is between the word 'int' and the word 
'return'. So the true "How to repeat:" 
would be: 
- Get attached file. It contains the 4 statements listed above. Call it 'test2.txt'. 
- Start mysql client. Don't use a setting that changes A0 character to something else. 
  It's probably unrepeatable unless you use ISO 8859-1 (West European) default. 
 
mysql> source test2.txt 
Database changed 
Query OK, 0 rows affected (0.00 sec) 
 
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 '? 
return 5' at line 1 
Packets out of order (Found: 2, expected 1) 
ERROR 2013 (HY000): Lost connection to MySQL server during query
[7 Oct 2004 17:46] Peter Gulutzan
Short script file containing NO-BREAK SPACE (hexadecimal A0)

Attachment: test2.txt (text/plain), 84 bytes.

[8 Oct 2004 13:58] MySQL Verification Team
Verified with 5.0.2-alpha-debug-log
[18 Mar 2005 15:38] 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