Bug #5167 Stored procedure: select 1 into @var crash on second call.
Submitted: 23 Aug 2004 12:56 Modified: 10 Sep 2004 14:57
Reporter: Konstantin Osipov (OCA) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0 OS:Any (All)
Assigned to: Bugs System CPU Architecture:Any

[23 Aug 2004 12:56] Konstantin Osipov
This bug has the same nature as Bug#5034, but for stored procedures.
As stored procedures will need a separate fix, I report it here.
This is the test case:

mysql> create procedure p1() select 1 into @var;
Query OK, 0 rows affected (0.00 sec)

mysql> call p1();
Query OK, 0 rows affected (0.00 sec)

mysql> call p1();
ERROR 2013 (HY000): Lost connection to MySQL server during query

The reason is that we delete select_send (in this case it's select_dumpvar) in the end of handle_select, whereas we should
cleanup it and reuse on next execution.

How to repeat:
See the test case given in description.
[10 Sep 2004 14:57] 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

Additional info:

Works after merge with 4.1.