| Bug #11247 | Stored procedures: Function calls in long loops leak memory | ||
|---|---|---|---|
| Submitted: | 10 Jun 2005 15:14 | Modified: | 18 Aug 2005 21:01 | 
| Reporter: | Per-Erik Martin | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) | 
| Version: | 5.0 | OS: | Any (Any) | 
| Assigned to: | Petr Chardin | CPU Architecture: | Any | 
   [10 Jun 2005 15:14]
   Per-Erik Martin        
  
 
   [14 Jun 2005 2:14]
   Peter Gulutzan        
  I experience trouble with a built-in function too, and after an hour or two it crashes.
5.0.8-beta-debug
set sql_mode='traditional'//
create procedure pv4 () begin declare v1 int default 0; while v1 < 1000000 do set v1 = v1 + 1; select v1, repeat('*',0); end while; end//
call pv4()//
 
   [16 Aug 2005 19:15]
   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/internals/28348
   [18 Aug 2005 19:54]
   Petr Chardin        
  The fix will go into 5.0.12
   [18 Aug 2005 21:01]
   Mike Hillyer        
  Documented in 5.0.12 changelog: <listitem><para>Stored procedures with particularly long loops could crash server due to memory leak. (Bug #12297, Bug #11247)</para></listitem>

