List:Commits« Previous MessageNext Message »
From:rsomla Date:April 12 2007 4:30pm
Subject:bk commit into 5.1 tree (rafal:1.2511)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of rafal. When rafal does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-04-12 18:30:32+02:00, rafal@quant.(none) +3 -0
  WL#3327: Fixing memory allocation/deallocation problems.

  sql/backup/README@stripped, 2007-04-12 18:30:28+02:00, rafal@quant.(none) +1 -0
    Describe new file.

  sql/backup/archive.cc@stripped, 2007-04-12 18:30:28+02:00, rafal@quant.(none) +0 -19
    Descructors moved to header file.

  sql/backup/archive.h@stripped, 2007-04-12 18:30:28+02:00, rafal@quant.(none) +13 -5
    Free memory allocated by list elements in the destructors.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	rafal
# Host:	quant.(none)
# Root:	/ext/mysql/bk/backup/prototype-push

--- 1.1/sql/backup/README	2007-04-12 18:30:38 +02:00
+++ 1.2/sql/backup/README	2007-04-12 18:30:38 +02:00
@@ -22,6 +22,7 @@
 --------------
 
 be_default.{cc,h} 	default backup engine.
+be_nodata.{cc,h}		trivial backup engine which stores no data.
 
 Support datatypes and functions
 -------------------------------

--- 1.4/sql/backup/archive.cc	2007-04-12 18:30:38 +02:00
+++ 1.5/sql/backup/archive.cc	2007-04-12 18:30:38 +02:00
@@ -16,25 +16,6 @@
   return(found);
 }
 
-Backup_info::~Backup_info()
-{
-  List_iterator<Backup_subimage> it(images);
-  Backup_subimage *img;
-
-  while ((img= it++))
-    delete img;
-  catalog.empty();
-}
-
-Restore_info::~Restore_info()
-{
-  List_iterator<Restore_subimage> it(images);
-  Restore_subimage *img;
-
-  while ((img= it++))
-    delete img;
-}
-
 } // backup namespace
 
 

--- 1.7/sql/backup/archive.h	2007-04-12 18:30:38 +02:00
+++ 1.8/sql/backup/archive.h	2007-04-12 18:30:38 +02:00
@@ -135,7 +135,7 @@
   String          *table_name;    // table name
   List<String>    table_metadata; // metadata for table
   ~table_info()
-  { table_metadata.empty(); }
+  { table_metadata.delete_elements(); }
 };
 
 struct schema_ref
@@ -145,8 +145,8 @@
   List<table_info> tables;        // the list of tables
   ~schema_ref()
   {
-    db_metadata.empty();
-    tables.empty();
+    db_metadata.delete_elements();
+    tables.delete_elements();
   }
 };
 
@@ -162,7 +162,11 @@
   Backup_info(): Image_info(7), default_image(NULL)
   {}
 
-  ~Backup_info();
+  ~Backup_info()
+  {
+    images.delete_elements();
+    catalog.delete_elements();
+  }
 
   // Add table stored in a given storage engine
   bool add(const Table_ref &tbl, const ::handlerton *hton);
@@ -176,7 +180,11 @@
   Restore_info(): Image_info(7)
   {}
 
-  ~Restore_info();
+  ~Restore_info()
+  {
+    images.delete_elements();
+    catalog.delete_elements();
+  }
 };
 
 } // backup namespace
Thread
bk commit into 5.1 tree (rafal:1.2511)rsomla12 Apr