Commit 008b1e52 authored by unknown's avatar unknown

Merge mysql.com:/home/stewart/Documents/MySQL/5.0/bugsmerge

into  mysql.com:/home/stewart/Documents/MySQL/5.1/main


storage/ndb/include/util/ConfigValues.hpp:
  Auto merged
storage/ndb/src/common/util/ConfigValues.cpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  manual merge (n/a in 5.1)
parents e978c8eb 773e91d5
...@@ -96,6 +96,7 @@ public: ...@@ -96,6 +96,7 @@ public:
public: public:
ConfigValuesFactory(Uint32 keys = 50, Uint32 data = 10); // Initial ConfigValuesFactory(Uint32 keys = 50, Uint32 data = 10); // Initial
ConfigValuesFactory(ConfigValues * m_cfg); // ConfigValuesFactory(ConfigValues * m_cfg); //
~ConfigValuesFactory();
ConfigValues * m_cfg; ConfigValues * m_cfg;
ConfigValues * getConfigValues(); ConfigValues * getConfigValues();
......
...@@ -294,6 +294,12 @@ ConfigValuesFactory::ConfigValuesFactory(ConfigValues * cfg){ ...@@ -294,6 +294,12 @@ ConfigValuesFactory::ConfigValuesFactory(ConfigValues * cfg){
} }
} }
ConfigValuesFactory::~ConfigValuesFactory()
{
if(m_cfg)
free(m_cfg);
}
ConfigValues * ConfigValues *
ConfigValuesFactory::create(Uint32 keys, Uint32 data){ ConfigValuesFactory::create(Uint32 keys, Uint32 data){
Uint32 sz = sizeof(ConfigValues); Uint32 sz = sizeof(ConfigValues);
...@@ -528,7 +534,7 @@ ConfigValuesFactory::extractCurrentSection(const ConfigValues::ConstIterator & c ...@@ -528,7 +534,7 @@ ConfigValuesFactory::extractCurrentSection(const ConfigValues::ConstIterator & c
} }
} }
ConfigValues * ret = fac->m_cfg; ConfigValues * ret = fac->getConfigValues();
delete fac; delete fac;
return ret; return ret;
} }
......
...@@ -1924,7 +1924,7 @@ ndb_mgm_get_configuration(NdbMgmHandle handle, unsigned int version) { ...@@ -1924,7 +1924,7 @@ ndb_mgm_get_configuration(NdbMgmHandle handle, unsigned int version) {
} }
delete prop; delete prop;
return (ndb_mgm_configuration*)cvf.m_cfg; return (ndb_mgm_configuration*)cvf.getConfigValues();
} while(0); } while(0);
delete prop; delete prop;
......
...@@ -2289,10 +2289,10 @@ ConfigInfo::ConfigInfo() ...@@ -2289,10 +2289,10 @@ ConfigInfo::ConfigInfo()
if (!m_info.getCopy(param._section, &section)) { if (!m_info.getCopy(param._section, &section)) {
Properties newsection(true); Properties newsection(true);
m_info.put(param._section, &newsection); m_info.put(param._section, &newsection);
}
// Get copy of section // Get copy of section
m_info.getCopy(param._section, &section); m_info.getCopy(param._section, &section);
}
// Create pinfo (parameter info) entry // Create pinfo (parameter info) entry
Properties pinfo(true); Properties pinfo(true);
...@@ -2347,6 +2347,7 @@ ConfigInfo::ConfigInfo() ...@@ -2347,6 +2347,7 @@ ConfigInfo::ConfigInfo()
// Replace section with modified section // Replace section with modified section
m_info.put(param._section, section, true); m_info.put(param._section, section, true);
delete section;
if(param._type != ConfigInfo::CI_SECTION){ if(param._type != ConfigInfo::CI_SECTION){
Properties * p; Properties * p;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment