Bug #643 Repeated syntax errors in SPs crashes the server
Submitted: 12 Jun 2003 4:35 Modified: 12 Jun 2003 7:52
Reporter: Per-Erik Martin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0 OS:Any (All)
Assigned to: Per-Erik Martin CPU Architecture:Any

[12 Jun 2003 4:35] Per-Erik Martin
Description:
There are reports that this might happen at the first syntax error as well,
but I've only been able to repeat it on the second error.

How to repeat:
% ./client/mysql test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.0-alpha-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create procedure test(t int);
ERROR 1064: 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 '' at line 1
mysql> create procedure test(t int);
ERROR 2013: Lost connection to MySQL server during query
[12 Jun 2003 7:52] Per-Erik Martin
Thank you for your bug report. This issue has been fixed in the latest
development tree for that product. You can find more information about
accessing our development trees at 
    http://www.mysql.com/doc/en/Installing_source_tree.html

The problem was an uninitialized slot (tok_start) in the lex structure
when swapping lex:es. If this actually caused a crash turned out to be
highly intermittent and platform dependent.