List:Commits« Previous MessageNext Message »
From:jonas oreland Date:August 27 2011 9:56am
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4480 to 4481)
View as plain text  
 4481 jonas oreland	2011-08-27
      ndb - still memory leak in error case in ha_ndbinfo::open

    modified:
      sql/ha_ndbinfo.cc
 4480 jonas oreland	2011-08-27
      ndbmtd - remove usage of g_map_instance
        and instead create duplicate thr_map instances when needed.

    modified:
      storage/ndb/src/kernel/SimBlockList.cpp
      storage/ndb/src/kernel/vm/SimulatedBlock.cpp
      storage/ndb/src/kernel/vm/SimulatedBlock.hpp
      storage/ndb/src/kernel/vm/dummy_nonmt.cpp
      storage/ndb/src/kernel/vm/mt.cpp
      storage/ndb/src/kernel/vm/mt.hpp
=== modified file 'sql/ha_ndbinfo.cc'
--- a/sql/ha_ndbinfo.cc	2011-06-30 15:59:25 +0000
+++ b/sql/ha_ndbinfo.cc	2011-08-27 09:54:26 +0000
@@ -367,6 +367,7 @@ int ha_ndbinfo::open(const char *name, i
   int err = g_ndbinfo->openTable(name, &m_impl.m_table);
   if (err)
   {
+    assert(m_impl.m_table == 0);
     if (err == NdbInfo::ERR_NoSuchTable)
       DBUG_RETURN(HA_ERR_NO_SUCH_TABLE);
     DBUG_RETURN(err2mysql(err));
@@ -390,6 +391,7 @@ int ha_ndbinfo::open(const char *name, i
       warn_incompatible(ndb_tab, true,
                         "column '%s' is NOT NULL",
                         field->field_name);
+      delete m_impl.m_table; m_impl.m_table= 0;
       DBUG_RETURN(ERR_INCOMPAT_TABLE_DEF);
     }
 
@@ -427,6 +429,7 @@ int ha_ndbinfo::open(const char *name, i
       warn_incompatible(ndb_tab, true,
                         "column '%s' is not compatible",
                         field->field_name);
+      delete m_impl.m_table; m_impl.m_table= 0;
       DBUG_RETURN(ERR_INCOMPAT_TABLE_DEF);
     }
   }

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4480 to 4481) jonas oreland29 Aug