Bug #4487 Stored procedure connection aborted if uninitialized char

Submitted: 9 Jul 2004 15:51 Modified: 9 Sep 2004 17:13
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: Per-Erik Martin CPU Architecture:Any

[9 Jul 2004 15:51] Peter Gulutzan
Description:
If I return a variable from a function, there is a connection failure. 
 
This happens only if the variable is CHAR (returning INT is okay). 
 
This happens only if the variable has never been the subject of an assignment (returning 
after "SET variable = value" is okay). 
 

How to repeat:
mysql> delimiter // 
mysql> create function f () returns char 
    -> begin 
    ->   declare v char; 
    ->   return v; 
    -> end;// 
Query OK, 0 rows affected, 1 warning (0.00 sec) 
 
mysql> select f();// 
ERROR 2013 (HY000): Lost connection to MySQL server during query
[9 Sep 2004 17:13] 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

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.