List:Commits« Previous MessageNext Message »
From:tomas Date:May 9 2006 2:51pm
Subject:bk commit into 5.1 tree (tomas:1.2390)
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.2390 06/05/09 14:51:42 tomas@stripped +2 -0
  stilled some valgrind memleak warnings

  storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
    1.55 06/05/09 14:51:35 tomas@stripped +11 -0
    stilled some valgrind memleak warnings

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
    1.130 06/05/09 14:51:35 tomas@stripped +49 -4
    stilled some valgrind memleak warnings

# 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.129/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2006-05-04 13:58:06 +02:00
+++ 1.130/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2006-05-09 14:51:35 +02:00
@@ -79,18 +79,26 @@
 NdbColumnImpl::NdbColumnImpl()
   : NdbDictionary::Column(* this), m_attrId(-1), m_facade(this)
 {
+  DBUG_ENTER("NdbColumnImpl::NdbColumnImpl");
+  DBUG_PRINT("info", ("this: %x", this));
   init();
+  DBUG_VOID_RETURN;
 }
 
 NdbColumnImpl::NdbColumnImpl(NdbDictionary::Column & f)
   : NdbDictionary::Column(* this), m_attrId(-1), m_facade(&f)
 {
+  DBUG_ENTER("NdbColumnImpl::NdbColumnImpl");
+  DBUG_PRINT("info", ("this: %x", this));
   init();
+  DBUG_VOID_RETURN;
 }
 
 NdbColumnImpl&
 NdbColumnImpl::operator=(const NdbColumnImpl& col)
 {
+  DBUG_ENTER("NdbColumnImpl::operator=");
+  DBUG_PRINT("info", ("this: %x  &col: %x", this, &col));
   m_attrId = col.m_attrId;
   m_name = col.m_name;
   m_type = col.m_type;
@@ -112,13 +120,14 @@
   if (col.m_blobTable == NULL)
     m_blobTable = NULL;
   else {
-    m_blobTable = new NdbTableImpl();
+    if (m_blobTable == NULL)
+      m_blobTable = new NdbTableImpl();
     m_blobTable->assign(*col.m_blobTable);
   }
   m_column_no = col.m_column_no;
   // Do not copy m_facade !!
 
-  return *this;
+  DBUG_RETURN(*this);
 }
 
 void
@@ -261,15 +270,19 @@
 
 NdbColumnImpl::~NdbColumnImpl()
 {
+  DBUG_ENTER("NdbColumnImpl::~NdbColumnImpl");
+  DBUG_PRINT("info", ("this: %x", this));
   if (m_blobTable != NULL)
     delete m_blobTable;
   m_blobTable = NULL;
+  DBUG_VOID_RETURN;
 }
 
 bool
 NdbColumnImpl::equal(const NdbColumnImpl& col) const 
 {
   DBUG_ENTER("NdbColumnImpl::equal");
+  DBUG_PRINT("info", ("this: %x  &col: %x", this, &col));
   if(strcmp(m_name.c_str(), col.m_name.c_str()) != 0){
     DBUG_RETURN(false);
   }
@@ -377,24 +390,33 @@
   : NdbDictionary::Table(* this), 
     NdbDictObjectImpl(NdbDictionary::Object::UserTable), m_facade(this)
 {
+  DBUG_ENTER("NdbTableImpl::NdbTableImpl");
+  DBUG_PRINT("info", ("this: %x", this));
   init();
+  DBUG_VOID_RETURN;
 }
 
 NdbTableImpl::NdbTableImpl(NdbDictionary::Table & f)
   : NdbDictionary::Table(* this), 
     NdbDictObjectImpl(NdbDictionary::Object::UserTable), m_facade(&f)
 {
+  DBUG_ENTER("NdbTableImpl::NdbTableImpl");
+  DBUG_PRINT("info", ("this: %x", this));
   init();
+  DBUG_VOID_RETURN;
 }
 
 NdbTableImpl::~NdbTableImpl()
 {
+  DBUG_ENTER("NdbTableImpl::~NdbTableImpl");
+  DBUG_PRINT("info", ("this: %x", this));
   if (m_index != 0) {
     delete m_index;
     m_index = 0;
   }
   for (unsigned i = 0; i < m_columns.size(); i++)
-    delete m_columns[i];  
+    delete m_columns[i];
+  DBUG_VOID_RETURN;
 }
 
 void
@@ -636,6 +658,8 @@
 void
 NdbTableImpl::assign(const NdbTableImpl& org)
 {
+  DBUG_ENTER("NdbColumnImpl::assign");
+  DBUG_PRINT("info", ("this: %x  &org: %x", this, &org));
   /* m_changeMask intentionally not copied */
   m_primaryTableId = org.m_primaryTableId;
   m_internalName.assign(org.m_internalName);
@@ -662,7 +686,14 @@
     m_columnHashMask, m_columnHash, m_hashValueMask, m_hashpointerValue
     is state calculated by computeAggregates and buildColumnHash
   */
-  for(unsigned i = 0; i<org.m_columns.size(); i++){
+  unsigned i;
+  for(i = 0; i < m_columns.size(); i++)
+  {
+    delete m_columns[i];
+  }
+  m_columns.clear();
+  for(i = 0; i < org.m_columns.size(); i++)
+  {
     NdbColumnImpl * col = new NdbColumnImpl();
     const NdbColumnImpl * iorg = org.m_columns[i];
     (* col) = (* iorg);
@@ -702,6 +733,7 @@
   m_tablespace_name = org.m_tablespace_name;
   m_tablespace_id= org.m_tablespace_id;
   m_tablespace_version = org.m_tablespace_version;
+  DBUG_VOID_RETURN;
 }
 
 void NdbTableImpl::setName(const char * name)
@@ -1085,14 +1117,20 @@
   NdbDictionary::Event(* this),
   NdbDictObjectImpl(NdbDictionary::Object::TypeUndefined), m_facade(this)
 {
+  DBUG_ENTER("NdbEventImpl::NdbEventImpl");
+  DBUG_PRINT("info", ("this: %x", this));
   init();
+  DBUG_VOID_RETURN;
 }
 
 NdbEventImpl::NdbEventImpl(NdbDictionary::Event & f) : 
   NdbDictionary::Event(* this),
   NdbDictObjectImpl(NdbDictionary::Object::TypeUndefined), m_facade(&f)
 {
+  DBUG_ENTER("NdbEventImpl::NdbEventImpl");
+  DBUG_PRINT("info", ("this: %x", this));
   init();
+  DBUG_VOID_RETURN;
 }
 
 void NdbEventImpl::init()
@@ -1108,10 +1146,13 @@
 
 NdbEventImpl::~NdbEventImpl()
 {
+  DBUG_ENTER("NdbEventImpl::~NdbEventImpl");
+  DBUG_PRINT("info", ("this: %x", this));
   for (unsigned i = 0; i < m_columns.size(); i++)
     delete  m_columns[i];
   if (m_tableImpl)
     delete m_tableImpl;
+  DBUG_VOID_RETURN;
 }
 
 void NdbEventImpl::setName(const char * name)
@@ -1134,11 +1175,14 @@
 void 
 NdbEventImpl::setTable(NdbTableImpl *tableImpl)
 {
+  DBUG_ENTER("NdbEventImpl::setTable");
+  DBUG_PRINT("info", ("this: %x  tableImpl: %x", this, tableImpl));
   DBUG_ASSERT(tableImpl->m_status != NdbDictionary::Object::Invalid);
   if (!m_tableImpl) 
     m_tableImpl = new NdbTableImpl();
   // Copy table, since event might be accessed from different threads
   m_tableImpl->assign(*tableImpl);
+  DBUG_VOID_RETURN;
 }
 
 const NdbDictionary::Table *
@@ -3944,6 +3988,7 @@
       if (blob_evnt == NULL)
         continue;
       (void)dropEvent(*blob_evnt);
+      delete blob_evnt;
     }
   } else {
     // loop over MAX_ATTRIBUTES_IN_TABLE ...

--- 1.54/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2006-05-08 14:11:07 +02:00
+++ 1.55/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2006-05-09 14:51:35 +02:00
@@ -189,6 +189,17 @@
   // m_bufferHandle->dropSubscribeEvent(m_bufferId);
   ; // ToDo? We should send stop signal here
   
+  if (theMainOp == NULL)
+  {
+    NdbEventOperationImpl* tBlobOp = theBlobOpList;
+    while (tBlobOp != NULL)
+    {
+      NdbEventOperationImpl *op = tBlobOp;
+      tBlobOp = tBlobOp->m_next;
+      delete op;
+    }
+  }
+
   m_ndb->theImpl->theNdbObjectIdMap.unmap(m_oid, this);
   DBUG_PRINT("exit",("this: %p/%p oid: %u main: %p",
              this, m_facade, m_oid, theMainOp));
Thread
bk commit into 5.1 tree (tomas:1.2390)tomas9 May