Bug #31963 Memory leaks in online backup code
Submitted: 30 Oct 2007 17:00 Modified: 21 Aug 2008 18:20
Reporter: Rafal Somla Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:5.2 OS:Any
Assigned to: Rafal Somla CPU Architecture:Any

[30 Oct 2007 17:00] Rafal Somla
Description:
There are memory leaks in the online backup code which have been missed by reviewers.

A) When backup drivers call create_table_list() function, they should free the allocated memory but they don't.

B) Inside Native_image class an instance of backup engine is created but its resources are not freed with a free() call. 

How to repeat:
See the code.

Suggested fix:
A) add free_table_list() function and call it in backup driver destructors.

B) call free() method in Native_image destructor.
[30 Oct 2007 17:18] 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/36678

ChangeSet@1.2610, 2007-10-30 18:17:19+01:00, rafal@quant.(none) +1 -0
  BUG#31963 (memory leaks in online backup code).
  
  This patch adds a call to free() method of native backup engine, so that
  it can free resources.
[30 Oct 2007 17:33] Chuck Bell
Path ok to push.
[31 Oct 2007 8:27] Rafal Somla
Pushed into 5.2-backup tree.
[20 Aug 2008 14:26] Chuck Bell
Pushed to 6.0.0.
[21 Aug 2008 18:20] Paul DuBois
Pushed to 6.0.5, the same release when BACKUP DATABASE/RESTORE originally appeared. So this bug is not in any released version; no changelog entry needed.