Bug #54138 stack overrun on in pb2 snv_111b (loki52)
Submitted: 1 Jun 2010 12:07 Modified: 22 Sep 2010 11:47
Reporter: Georgi Kodinov Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1 OS:Solaris (SunOS loki52 5.11 snv_111b i86pc i386 i86pc)
Assigned to: Assigned Account CPU Architecture:Any

[1 Jun 2010 12:07] Georgi Kodinov
Description:
tests main.sp and rpl.rpl_row_sp011 fail with thread stack overflow on this platform:

main.sp                                  [ fail ]
        Test ended at 2010-05-31 16:46:29

CURRENT_TEST: main.sp
mysqltest: At line 4977: query 'call bug10100t(5)' failed: 1436: Thread stack overrun:  68656 bytes used of a 196608 byte stack, and 128000 bytes needed.  Use 'mysqld -O thread_stack=#' to specify a bigger stack.

The result from queries just before the failure was:
< snip >
if level < lim then
select level;
fetch c into lv;
select lv;
update t3 set a=level+lv;
FLUSH TABLES;
call bug10100pc(level+1, lim);
else
select * from t3;
end if;
close c;
end|
set @@max_sp_recursion_depth=4|
select @@max_sp_recursion_depth|
@@max_sp_recursion_depth
4
select bug10100f(3)|
ERROR HY000: Recursive stored functions and triggers are not allowed.
select bug10100f(6)|
ERROR HY000: Recursive stored functions and triggers are not allowed.

How to repeat:
observe pb2 of any mysql-5.1 related clone

Suggested fix:
n/a. Probably related to http://bugs.mysql.com/bug.php?id=15629
[1 Jun 2010 12:16] 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/109728

3407 Georgi Kodinov	2010-06-01
      Bug #54138 : making main.sp and rpl.rpl_row_sp011 experimental on solaris
[2 Jun 2010 8:49] Bugs System
Pushed into 5.1.48 (revid:georgi.kodinov@oracle.com-20100602084411-2yu607bslbmgufl3) (version source revid:georgi.kodinov@oracle.com-20100601121438-s8nbdc47xcetbung) (merge vers: 5.1.48) (pib:16)
[17 Jun 2010 6:12] Bugs System
Pushed into 5.5.5-m3 (revid:alexey.kopytov@sun.com-20100615145247-8bj0vmuqlotbqsn9) (version source revid:georgi.kodinov@oracle.com-20100601123137-l8svn3xfxtp0y8nk) (merge vers: 5.5.5-m3) (pib:16)
[17 Jun 2010 6:16] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100615150216-cubqoyn1fj9b6a2p) (version source revid:alik@sun.com-20100607075151-xjus8wzgjv3g9ok0) (pib:16)
[18 Aug 2010 10:15] Joerg Bruehe
Similar (same ?) problems are already reported in (at least) bug#47128 and bug#47791, I think this one should be considered a "duplicate".

Like done here, the "fix" was to mark them "experimental".

Rather than making tests experimental and letting this mess live on,
a root fix should help ...
[22 Sep 2010 11:47] Dmitry Shulga
This is a duplicate of bug#45445.
[14 Oct 2010 8:33] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:21)
[14 Oct 2010 8:49] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.39 (revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:21)
[14 Oct 2010 9:03] Bugs System
Pushed into mysql-5.1-telco-6.2 5.1.51-ndb-6.2.19 (revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:21)