Bug #5245 Stored procedure crash if insert function value
Submitted: 27 Aug 2004 2:40 Modified: 28 Sep 2004 14:48
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

[27 Aug 2004 2:40] Peter Gulutzan
Description:
Using functions as values for INSERT causes crashes. The return is of a variable which is 
set inside the function. UPDATE seems to suffer from the same malady. 

How to repeat:
mysql> delimiter // 
mysql> create table t410 (s1 int)// 
Query OK, 0 rows affected (0.29 sec) 
 
mysql> create function f410 () returns int begin declare v int; set v = 0; return v; end;// 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> insert into t410 values (f410())// 
ERROR 2013 (HY000): Lost connection to MySQL server during query
[27 Aug 2004 3:33] MySQL Verification Team
Thank you for the bug report I was able to repeat with
latest server from BK 5.0.
[28 Sep 2004 14: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

Additional info:

This is no longer repeatable.