summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <stewart@mysql.com>2006-06-20 18:27:54 +1000
committerunknown <stewart@mysql.com>2006-06-20 18:27:54 +1000
commit0f6a24ad6c0c5caef0101c56ad1a6c2313d103d6 (patch)
tree5cba329395a62bbf9b702bc85d7c959c78a9b623 /ndb
parent375a1894512b80302fb73858759050d3d56b58bf (diff)
parent773e91d5133b0be1be41a412d6036e2735c77d70 (diff)
downloadmariadb-git-0f6a24ad6c0c5caef0101c56ad1a6c2313d103d6.tar.gz
Merge mysql.com:/home/stewart/Documents/MySQL/5.0/main
into mysql.com:/home/stewart/Documents/MySQL/5.0/bugsmerge ndb/src/mgmapi/mgmapi.cpp: Auto merged ndb/src/mgmsrv/ConfigInfo.cpp: Auto merged ndb/src/mgmsrv/MgmtSrvr.cpp: Auto merged
Diffstat (limited to 'ndb')
-rw-r--r--ndb/include/util/ConfigValues.hpp1
-rw-r--r--ndb/src/common/util/ConfigValues.cpp8
-rw-r--r--ndb/src/mgmapi/mgmapi.cpp2
-rw-r--r--ndb/src/mgmsrv/ConfigInfo.cpp9
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.cpp2
5 files changed, 15 insertions, 7 deletions
diff --git a/ndb/include/util/ConfigValues.hpp b/ndb/include/util/ConfigValues.hpp
index 457488e3c42..8dfb3c83df3 100644
--- a/ndb/include/util/ConfigValues.hpp
+++ b/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/ndb/src/common/util/ConfigValues.cpp b/ndb/src/common/util/ConfigValues.cpp
index 5c4b17c73ca..ae4fbfd2f71 100644
--- a/ndb/src/common/util/ConfigValues.cpp
+++ b/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/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp
index 7ad20e504f6..4428b158b6b 100644
--- a/ndb/src/mgmapi/mgmapi.cpp
+++ b/ndb/src/mgmapi/mgmapi.cpp
@@ -1945,7 +1945,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/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp
index e9093d59494..dfe4f9aa63e 100644
--- a/ndb/src/mgmsrv/ConfigInfo.cpp
+++ b/ndb/src/mgmsrv/ConfigInfo.cpp
@@ -2241,11 +2241,11 @@ ConfigInfo::ConfigInfo()
if (!m_info.getCopy(param._section, &section)) {
Properties newsection(true);
m_info.put(param._section, &newsection);
+
+ // Get copy of section
+ m_info.getCopy(param._section, &section);
}
-
- // Get copy of section
- m_info.getCopy(param._section, &section);
-
+
// Create pinfo (parameter info) entry
Properties pinfo(true);
pinfo.put("Id", param._paramId);
@@ -2299,6 +2299,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;
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp
index 2505515c086..b9466ed1173 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -1863,7 +1863,7 @@ MgmtSrvr::handleReceivedSignal(NdbApiSignal* signal)
break;
case GSN_EVENT_REP:
{
- EventReport *rep = CAST_PTR(EventReport, signal->getDataPtrSend());
+ EventReport *rep = (EventReport*) signal->getDataPtr();
if (rep->getNodeId() == 0)
rep->setNodeId(refToNode(signal->theSendersBlockRef));
eventReport(signal->getDataPtr());