MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Rafal Somla Date:January 13 2010 1:38pm
Subject:bzr commit into mysql-backup-backport branch (Rafal.Somla:3061)
Bug#50225
View as plain text  
#At file:///ext/mysql/bzr/backup/bug50225/ based on revid:hema@stripped

 3061 Rafal Somla	2010-01-13
      Bug #50225 - rpl_backup_shutdown reveals memory issue in backup code
      
      Ensure that object returned by obs::find_table_for_trigger() is always deleted.
     @ sql/backup/backup_info.cc
        Delete tbl_obj instance returned by obs::find_table_for_trigger().
     @ sql/si_objects.cc
        Add note that object returned by find_table_for_trigger() must be deleted by caller.

    modified:
      sql/backup/backup_info.cc
      sql/si_objects.cc
=== modified file 'sql/backup/backup_info.cc'
--- a/sql/backup/backup_info.cc	2009-12-22 20:35:01 +0000
+++ b/sql/backup/backup_info.cc	2010-01-13 13:38:15 +0000
@@ -1388,6 +1388,7 @@ Backup_info::add_db_object(Db &db, const
     {
       // TODO: Consider more specific error message.
       m_log.report_error(error, db.name().ptr(), obj->get_name()->ptr());
+      delete tbl_obj;
       return NULL;
     }
     
@@ -1398,10 +1399,12 @@ Backup_info::add_db_object(Db &db, const
     {
       // TODO: Consider more specific error message.
       m_log.report_error(error, db.name().ptr(), obj->get_name()->ptr());
+      delete tbl_obj;
       return NULL;
     }
     
     trg_table= db_found->find_table(*tbl_obj->get_name());
+    delete tbl_obj;
     
     DBUG_EXECUTE_IF("ER_BACKUP_CATALOG_ADD_TRIGGER_3", trg_table= NULL;);
     if (!trg_table)

=== modified file 'sql/si_objects.cc'
--- a/sql/si_objects.cc	2009-12-22 20:35:01 +0000
+++ b/sql/si_objects.cc	2010-01-13 13:38:15 +0000
@@ -3149,7 +3149,8 @@ Obj *find_tablespace_for_table(THD *thd,
 /**
   Retrieve the table name for a trigger
 
-  This method returns a @c Table_obj object for the trigger.
+  This method returns a @c Table_obj object for the trigger. It must be deleted
+  by the caller.
 
   @param[in]  thd          Thread context.
   @param[in]  db_name      The database name for the trigger.


Attachment: [text/bzr-bundle] bzr/rafal.somla@sun.com-20100113133815-ab8mwj09uzwovef4.bundle
Thread
bzr commit into mysql-backup-backport branch (Rafal.Somla:3061)Bug#50225Rafal Somla13 Jan