Bug #18037 Server crash when returning system variable in stored procedures
Submitted: 7 Mar 2006 15:15 Modified: 17 May 2006 18:03
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S1 (Critical)
Version:5.0.18, 5.1.7 and up OS:Mac OS X (OS X on PPC)
Assigned to: Kristian Nielsen CPU Architecture:Any

[7 Mar 2006 15:15] Joerg Bruehe
Description:
This error started to occur with 5.0.18, also shows up in 5.0.19 and 5.1.7.

It happens only in "debug" builds on PPC machines running OS X.

=====
sp                             [ fail ]

Errors are (from PATH/mysqltest-time) :
mysqltest: At line NNN: query 'select bug2674()' failed: 2013: Lost connection to MySQL server during query
(the last lines may be the most important ones)

Ending Tests
=====

5.0.18:
powermacg5-5.0-debug.log   normal
powermacg5-5.0-debug.log   ps-protocol
xserve-64bit-5.0-debug.log   normal
xserve-64bit-5.0-debug.log   ps-protocol

5.1.7:
powermacg5-5.1-community.log   debug
(no "xserve" now, machine is down)

5.0.19:
powermacg5-5.0-debug.log   normal
powermacg5-5.0-debug.log   ps
(no "xserve" now, machine is down)

How to repeat:
Test suite.
[19 Apr 2006 13:56] Joerg Bruehe
Sorry - I have to re-open this bug.
It re-occurred in the 5.0.20a builds.
[9 May 2006 21:09] Konstantin Osipov
Bug#19633 "Stack corruption in fix_fields()/THD::rollback_item_tree_changes()" has been marked as a duplicate of this bug.
[9 May 2006 21:10] Konstantin Osipov
Alik, please review the following changeset:

  http://lists.mysql.com/commits/6156

Thank you.
[10 May 2006 8:00] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/6182
[10 May 2006 8:04] Kristian Nielsen
I committed a new patch, this one for 5.0.

The content of the patch is essentially identical to the previous one for 5.1.
[15 May 2006 11:43] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/6377
[15 May 2006 12:54] Kristian Nielsen
Pushed to 5.0.22.
[16 May 2006 19:55] Kristian Nielsen
Pushed into 5.1.11.
[16 May 2006 19:56] Kristian Nielsen
For documentation purposes, Bug#19633 has a better description of the problem that is fixed with this bug.
[17 May 2006 18:03] Paul Dubois
Noted in 5.0.22, 5.1.11 changelogs.

Returning the value of a system variable from a stored
function caused a server crash.
[18 May 2006 10:44] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/6559