MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:tomas Date:May 8 2006 4:09pm
Subject:bk commit into 5.1 tree (tomas:1.2386) BUG#19572
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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
  1.2386 06/05/08 18:09:01 tomas@stripped +2 -0
  Bug #19572 Memory leaks in cluster when running make test

  sql/ha_ndbcluster_binlog.cc
    1.51 06/05/08 18:08:53 tomas@stripped +6 -2
    Bug #19572 Memory leaks in cluster when running make test

  sql/ha_ndbcluster.cc
    1.303 06/05/08 18:08:52 tomas@stripped +4 -1
    Bug #19572 Memory leaks in cluster when running make test

# 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:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-new-ndb

--- 1.302/sql/ha_ndbcluster.cc	2006-05-08 08:55:41 +02:00
+++ 1.303/sql/ha_ndbcluster.cc	2006-05-08 18:08:52 +02:00
@@ -4431,8 +4431,11 @@
   if (readfrm(name, &data, &length))
     DBUG_RETURN(1);
   if (packfrm(data, length, &pack_data, &pack_length))
+  {
+    my_free((char*)data, MYF(0));
     DBUG_RETURN(2);
-  
+  }
+
   DBUG_PRINT("info", ("setFrm data=%lx  len=%d", pack_data, pack_length));
   tab.setFrm(pack_data, pack_length);      
   my_free((char*)data, MYF(0));

--- 1.50/sql/ha_ndbcluster_binlog.cc	2006-05-06 01:25:36 +02:00
+++ 1.51/sql/ha_ndbcluster_binlog.cc	2006-05-08 18:08:53 +02:00
@@ -255,7 +255,7 @@
   DBUG_ENTER("ndbcluster_binlog_close_table");
   if (share->table_share)
   {
-    free_table_share(share->table_share);
+    closefrm(share->table, 1);
     share->table_share= 0;
     share->table= 0;
   }
@@ -1458,7 +1458,7 @@
 {
   DBUG_ENTER("ndb_handle_schema_change");
   TABLE* table= share->table;
-  TABLE_SHARE *table_share= table->s;
+  TABLE_SHARE *table_share= share->table_share;
   const char *dbname= table_share->db.str;
   const char *tabname= table_share->table_name.str;
   bool do_close_cached_tables= FALSE;
@@ -1527,6 +1527,8 @@
           old->getObjectVersion() != altered_table->getObjectVersion())
         dict->putTable(altered_table);
       
+      my_free((char*)data, MYF(MY_ALLOW_ZERO_PTR));
+      data= NULL;
       if ((error= unpackfrm(&data, &length, altered_table->getFrmData())) ||
           (error= writefrm(key, data, length)))
       {
@@ -1547,6 +1549,8 @@
                               dbname, tabname);
       pthread_mutex_unlock(&LOCK_open);
     }
+    my_free((char*)data, MYF(MY_ALLOW_ZERO_PTR));
+    my_free((char*)pack_data, MYF(MY_ALLOW_ZERO_PTR));
   }
 
   // If only frm was changed continue replicating
Thread
bk commit into 5.1 tree (tomas:1.2386) BUG#19572tomas8 May