MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:August 16 2006 6:33am
Subject:bk commit into 5.0 tree (stewart:1.2248) BUG#21670
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of stewart. When stewart 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, 2006-08-16 14:33:31+08:00, stewart@willster.(none) +1 -0
  BUG#21670 memory leak in ndb_mgm -e show
  
  fix the following valgrind warning when running ndb_mgm -e show (leak only in client)
  
  ==20398== 14,596 (11,936 direct, 2,660 indirect) bytes in 4 blocks are definitely lost in loss record 24 of 25
  ==20398==    at 0x401C4A1: malloc (vg_replace_malloc.c:149)
  ==20398==    by 0x80797A3: ConfigValuesFactory::create(unsigned, unsigned) (ConfigValues.cpp:309)
  ==20398==    by 0x8079F03: ConfigValuesFactory::expand(unsigned, unsigned) (ConfigValues.cpp:325)
  ==20398==    by 0x8079967: ConfigValuesFactory::put(ConfigValues::Entry const&) (ConfigValues.cpp:414)
  ==20398==    by 0x807A7B6: ConfigValuesFactory::unpack(void const*, unsigned) (ConfigValues.cpp:701)
  ==20398==    by 0x806CB9D: ConfigValuesFactory::unpack(UtilBuffer const&) (ConfigValues.hpp:252)
  ==20398==    by 0x8069160: ndb_mgm_get_configuration (mgmapi.cpp:1941)
  ==20398==    by 0x8060661: CommandInterpreter::executeShow(char*) (CommandInterpreter.cpp:1242)
  ==20398==    by 0x8063966: CommandInterpreter::execute_impl(char const*) (CommandInterpreter.cpp:715)
  ==20398==    by 0x8064040: CommandInterpreter::execute(char const*, int, int*) (CommandInterpreter.cpp:625)
  ==20398==    by 0x8064189: Ndb_mgmclient::execute(char const*, int, int*) (CommandInterpreter.cpp:203)
  ==20398==    by 0x805E56C: read_and_execute(int) (main.cpp:124)
  ==20398==    by 0x805E754: main (main.cpp:162)
  ==20398==

  ndb/src/mgmclient/CommandInterpreter.cpp@stripped, 2006-08-16 14:33:26+08:00, stewart@willster.(none) +2 -0
    correctly free (destroy) the configuration fetched for show

# 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:	stewart
# Host:	willster.(none)
# Root:	/home/stewart/Documents/MySQL/5.0/ndb

--- 1.63/ndb/src/mgmclient/CommandInterpreter.cpp	2006-08-16 14:33:36 +08:00
+++ 1.64/ndb/src/mgmclient/CommandInterpreter.cpp	2006-08-16 14:33:36 +08:00
@@ -1245,6 +1245,7 @@
 
     if(it == 0){
       ndbout_c("Unable to create config iterator");
+      ndb_mgm_destroy_configuration(conf);
       return;
     }
     NdbAutoPtr<ndb_mgm_configuration_iterator> ptr(it);
@@ -1291,6 +1292,7 @@
     print_nodes(state, it, "ndb_mgmd", mgm_nodes, NDB_MGM_NODE_TYPE_MGM, 0);
     print_nodes(state, it, "mysqld",   api_nodes, NDB_MGM_NODE_TYPE_API, 0);
     //    ndbout << helpTextShow;
+    ndb_mgm_destroy_configuration(conf);
     return;
   } else if (strcasecmp(parameters, "PROPERTIES") == 0 ||
 	     strcasecmp(parameters, "PROP") == 0) {
Thread
bk commit into 5.0 tree (stewart:1.2248) BUG#21670Stewart Smith16 Aug