List:Commits« Previous MessageNext Message »
From:tomas Date:July 13 2007 11:36am
Subject:bk commit into 5.1 tree (tomas:1.2584)
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@stripped, 2007-07-13 11:36:04+02:00, tomas@stripped +2 -0
  still memleak

  sql/ha_ndbcluster.cc@stripped, 2007-07-13 11:36:01+02:00, tomas@stripped +8
-4
    still memleak

  sql/ha_ndbcluster.h@stripped, 2007-07-13 11:36:01+02:00, tomas@stripped +6
-6
    still memleak

# 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:	whalegate.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-telco-6.2

--- 1.482/sql/ha_ndbcluster.cc	2007-07-12 12:34:41 +02:00
+++ 1.483/sql/ha_ndbcluster.cc	2007-07-13 11:36:01 +02:00
@@ -10869,7 +10869,7 @@
   dropping= dropping | HA_DROP_INDEX | HA_DROP_UNIQUE_INDEX;
 
   if (!(alter_data= new NDB_ALTER_DATA(dict, m_table)))
-    DBUG_RETURN(-1);
+    DBUG_RETURN(HA_ERR_OUT_OF_MEM);
   old_tab= alter_data->old_table;
   new_tab= alter_data->new_table;
   alter_info->data= alter_data;
@@ -10963,8 +10963,10 @@
        DBUG_PRINT("info", ("Found new field %s", field->field_name));
        if ((my_errno= create_ndb_column(thd, col, field, create_info,
                                         COLUMN_FORMAT_TYPE_DYNAMIC)))
-	  DBUG_RETURN(my_errno);
-
+       {
+         error= my_errno;
+         goto err;
+       }
        /*
 	 If the user has not specified the field format
 	 make it dynamic to enable on-line add attribute
@@ -10983,7 +10985,9 @@
      }
   }
 
+  DBUG_RETURN(0);
  err:
+  delete alter_data;
   DBUG_RETURN(error);
 }
 
@@ -11073,8 +11077,8 @@
 
   DBUG_ASSERT(alter_data);
   error= alter_frm(altered_table->s->path.str, alter_data);
-  delete alter_data;
  err:
+  delete alter_data;
   DBUG_RETURN(error);
 }
 

--- 1.186/sql/ha_ndbcluster.h	2007-07-12 12:19:15 +02:00
+++ 1.187/sql/ha_ndbcluster.h	2007-07-13 11:36:01 +02:00
@@ -91,21 +91,21 @@
   NdbRecord *ndb_unique_record_row;
 } NDB_INDEX_DATA;
 
-typedef struct ndb_alter_data {
-  ndb_alter_data(NdbDictionary::Dictionary *dict,
+class NDB_ALTER_DATA : public Sql_alloc
+{
+public:
+  NDB_ALTER_DATA(NdbDictionary::Dictionary *dict,
 		 const NdbDictionary::Table *table) :
     dictionary(dict),
     old_table(table),
     new_table(new NdbDictionary::Table(*table))
   {}
-  ~ndb_alter_data()
+  ~NDB_ALTER_DATA()
   { delete new_table; }
   NdbDictionary::Dictionary *dictionary;
   const  NdbDictionary::Table *old_table;
   NdbDictionary::Table *new_table;
-} NDB_ALTER_DATA;
-
-
+};
 
 typedef union { const NdbRecAttr *rec; NdbBlob *blob; void *ptr; } NdbValue;
 
Thread
bk commit into 5.1 tree (tomas:1.2584)tomas13 Jul