diff options
author | unknown <stewart@mysql.com> | 2006-06-20 17:33:14 +1000 |
---|---|---|
committer | unknown <stewart@mysql.com> | 2006-06-20 17:33:14 +1000 |
commit | 008b1e5227d7c2186179013194cca3b4151ed113 (patch) | |
tree | 2df41dfc1d94e9f223fe1a5d4c500717dcbab125 /storage | |
parent | e978c8eb9c18832765bc4b9c1c1c17a184ab2b77 (diff) | |
parent | 773e91d5133b0be1be41a412d6036e2735c77d70 (diff) | |
download | mariadb-git-008b1e5227d7c2186179013194cca3b4151ed113.tar.gz |
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)
Diffstat (limited to 'storage')
-rw-r--r-- | storage/ndb/include/util/ConfigValues.hpp | 1 | ||||
-rw-r--r-- | storage/ndb/src/common/util/ConfigValues.cpp | 8 | ||||
-rw-r--r-- | storage/ndb/src/mgmapi/mgmapi.cpp | 2 | ||||
-rw-r--r-- | storage/ndb/src/mgmsrv/ConfigInfo.cpp | 9 |
4 files changed, 14 insertions, 6 deletions
diff --git a/storage/ndb/include/util/ConfigValues.hpp b/storage/ndb/include/util/ConfigValues.hpp index 457488e3c42..8dfb3c83df3 100644 --- a/storage/ndb/include/util/ConfigValues.hpp +++ b/storage/ndb/include/util/ConfigValues.hpp @@ -96,6 +96,7 @@ public: public: ConfigValuesFactory(Uint32 keys = 50, Uint32 data = 10); // Initial ConfigValuesFactory(ConfigValues * m_cfg); // + ~ConfigValuesFactory(); ConfigValues * m_cfg; ConfigValues * getConfigValues(); diff --git a/storage/ndb/src/common/util/ConfigValues.cpp b/storage/ndb/src/common/util/ConfigValues.cpp index 5c4b17c73ca..ae4fbfd2f71 100644 --- a/storage/ndb/src/common/util/ConfigValues.cpp +++ b/storage/ndb/src/common/util/ConfigValues.cpp @@ -294,6 +294,12 @@ ConfigValuesFactory::ConfigValuesFactory(ConfigValues * cfg){ } } +ConfigValuesFactory::~ConfigValuesFactory() +{ + if(m_cfg) + free(m_cfg); +} + ConfigValues * ConfigValuesFactory::create(Uint32 keys, Uint32 data){ Uint32 sz = sizeof(ConfigValues); @@ -528,7 +534,7 @@ ConfigValuesFactory::extractCurrentSection(const ConfigValues::ConstIterator & c } } - ConfigValues * ret = fac->m_cfg; + ConfigValues * ret = fac->getConfigValues(); delete fac; return ret; } diff --git a/storage/ndb/src/mgmapi/mgmapi.cpp b/storage/ndb/src/mgmapi/mgmapi.cpp index f184f089f2d..43021a8d669 100644 --- a/storage/ndb/src/mgmapi/mgmapi.cpp +++ b/storage/ndb/src/mgmapi/mgmapi.cpp @@ -1924,7 +1924,7 @@ ndb_mgm_get_configuration(NdbMgmHandle handle, unsigned int version) { } delete prop; - return (ndb_mgm_configuration*)cvf.m_cfg; + return (ndb_mgm_configuration*)cvf.getConfigValues(); } while(0); delete prop; diff --git a/storage/ndb/src/mgmsrv/ConfigInfo.cpp b/storage/ndb/src/mgmsrv/ConfigInfo.cpp index 8705b640809..42776798385 100644 --- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp @@ -2289,11 +2289,11 @@ ConfigInfo::ConfigInfo() if (!m_info.getCopy(param._section, §ion)) { Properties newsection(true); m_info.put(param._section, &newsection); + + // Get copy of section + m_info.getCopy(param._section, §ion); } - - // Get copy of section - m_info.getCopy(param._section, §ion); - + // Create pinfo (parameter info) entry Properties pinfo(true); pinfo.put("Id", param._paramId); @@ -2347,6 +2347,7 @@ ConfigInfo::ConfigInfo() // Replace section with modified section m_info.put(param._section, section, true); + delete section; if(param._type != ConfigInfo::CI_SECTION){ Properties * p; |