Commit 97956339 authored by unknown's avatar unknown

ndb

  impl support for querying resource usage in ndb api
  to help track down mem leaks


ndb/include/ndbapi/Ndb.hpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/include/ndbapi/NdbBlob.hpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/include/ndbapi/NdbConnection.hpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/include/ndbapi/NdbIndexOperation.hpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/include/ndbapi/NdbIndexScanOperation.hpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/include/ndbapi/NdbOperation.hpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/include/ndbapi/NdbRecAttr.hpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/src/ndbapi/NdbApiSignal.cpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/src/ndbapi/NdbApiSignal.hpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/src/ndbapi/NdbBlob.cpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/src/ndbapi/NdbImpl.hpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/src/ndbapi/NdbRecAttr.cpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/src/ndbapi/NdbUtil.cpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/src/ndbapi/NdbUtil.hpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/src/ndbapi/Ndbif.cpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/src/ndbapi/Ndbinit.cpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/src/ndbapi/Ndblist.cpp:
  Impl. reporting of free list usage
  Put free list into handler class
ndb/tools/restore/Restore.cpp:
  Impl. reporting of free list usage
  Put free list into handler class
parent 01587e47
...@@ -882,10 +882,10 @@ class BaseString; ...@@ -882,10 +882,10 @@ class BaseString;
class NdbEventOperation; class NdbEventOperation;
class NdbBlob; class NdbBlob;
class NdbReceiver; class NdbReceiver;
template <class T> struct Ndb_free_list_t;
typedef void (* NdbEventCallback)(NdbEventOperation*, Ndb*, void*); typedef void (* NdbEventCallback)(NdbEventOperation*, Ndb*, void*);
#if defined NDB_OSE #if defined NDB_OSE
/** /**
* Default time to wait for response after request has been sent to * Default time to wait for response after request has been sent to
...@@ -1386,8 +1386,20 @@ public: ...@@ -1386,8 +1386,20 @@ public:
*/ */
NdbConnection* hupp( NdbConnection* ); NdbConnection* hupp( NdbConnection* );
Uint32 getReference() const { return theMyRef;} Uint32 getReference() const { return theMyRef;}
struct Free_list_usage
{
const char * m_name;
Uint32 m_created;
Uint32 m_free;
Uint32 m_sizeof;
};
Free_list_usage * get_free_list_usage(Free_list_usage*);
#endif #endif
/***************************************************************************** /*****************************************************************************
* These are service routines used by the other classes in the NDBAPI. * These are service routines used by the other classes in the NDBAPI.
****************************************************************************/ ****************************************************************************/
...@@ -1562,22 +1574,8 @@ private: ...@@ -1562,22 +1574,8 @@ private:
class NdbDictionaryImpl* theDictionary; class NdbDictionaryImpl* theDictionary;
class NdbGlobalEventBufferHandle* theGlobalEventBufferHandle; class NdbGlobalEventBufferHandle* theGlobalEventBufferHandle;
NdbConnection* theConIdleList; // First connection in idle list.
NdbOperation* theOpIdleList; // First operation in the idle list.
NdbIndexScanOperation* theScanOpIdleList; // First scan operation in the idle list.
NdbIndexOperation* theIndexOpIdleList; // First index operation in the idle list.
NdbConnection* theTransactionList; NdbConnection* theTransactionList;
NdbConnection** theConnectionArray; NdbConnection** theConnectionArray;
NdbRecAttr* theRecAttrIdleList;
NdbApiSignal* theSignalIdleList; // First signal in idlelist.
NdbLabel* theLabelList; // First label descriptor in list
NdbBranch* theBranchList; // First branch descriptor in list
NdbSubroutine* theSubroutineList; // First subroutine descriptor in
NdbCall* theCallList; // First call descriptor in list
NdbReceiver* theScanList;
NdbBlob* theNdbBlobIdleList;
Uint32 theMyRef; // My block reference Uint32 theMyRef; // My block reference
Uint32 theNode; // The node number of our node Uint32 theNode; // The node number of our node
......
...@@ -262,7 +262,7 @@ private: ...@@ -262,7 +262,7 @@ private:
// for keeping in lists // for keeping in lists
NdbBlob* theNext; NdbBlob* theNext;
// initialization // initialization
NdbBlob(); NdbBlob(Ndb*);
void init(); void init();
void release(); void release();
// classify operations // classify operations
...@@ -314,6 +314,10 @@ private: ...@@ -314,6 +314,10 @@ private:
int getOperationType() const; int getOperationType() const;
friend class NdbOut& operator<<(NdbOut&, const NdbBlob&); friend class NdbOut& operator<<(NdbOut&, const NdbBlob&);
#endif #endif
void next(NdbBlob* obj) { theNext= obj;}
NdbBlob* next() { return theNext;}
friend struct Ndb_free_list_t<NdbBlob>;
}; };
#endif #endif
...@@ -18,8 +18,9 @@ ...@@ -18,8 +18,9 @@
#define NdbConnection_H #define NdbConnection_H
#include <ndb_types.h> #include <ndb_types.h>
#include <NdbError.hpp> #include "NdbError.hpp"
#include <NdbDictionary.hpp> #include "NdbDictionary.hpp"
#include "Ndb.hpp"
class NdbConnection; class NdbConnection;
class NdbOperation; class NdbOperation;
...@@ -465,10 +466,10 @@ private: ...@@ -465,10 +466,10 @@ private:
/************************************************************************** /**************************************************************************
* These are the create and delete methods of this class. * * These are the create and delete methods of this class. *
**************************************************************************/ **************************************************************************/
NdbConnection(Ndb* aNdb); NdbConnection(Ndb* aNdb);
~NdbConnection(); ~NdbConnection();
NdbConnection* next(); // Returns the next pointer
void next(NdbConnection*); // Sets the next pointer
void init(); // Initialize connection object for new transaction void init(); // Initialize connection object for new transaction
...@@ -487,8 +488,6 @@ private: ...@@ -487,8 +488,6 @@ private:
int getTC_ConnectPtr(); // Gets TC Connect pointer int getTC_ConnectPtr(); // Gets TC Connect pointer
void setBuddyConPtr(Uint32); // Sets Buddy Con Ptr void setBuddyConPtr(Uint32); // Sets Buddy Con Ptr
Uint32 getBuddyConPtr(); // Gets Buddy Con Ptr Uint32 getBuddyConPtr(); // Gets Buddy Con Ptr
NdbConnection* next(); // Returns the next pointer
void next(NdbConnection*); // Sets the next pointer
enum ConStatusType { enum ConStatusType {
NotConnected, NotConnected,
...@@ -691,6 +690,7 @@ private: ...@@ -691,6 +690,7 @@ private:
void define_scan_op(NdbIndexScanOperation*); void define_scan_op(NdbIndexScanOperation*);
friend class HugoOperations; friend class HugoOperations;
friend struct Ndb_free_list_t<NdbConnection>;
}; };
inline inline
......
...@@ -200,6 +200,7 @@ private: ...@@ -200,6 +200,7 @@ private:
Uint32 m_theIndexDefined[NDB_MAX_ATTRIBUTES_IN_INDEX][3]; Uint32 m_theIndexDefined[NDB_MAX_ATTRIBUTES_IN_INDEX][3];
Uint32 m_theIndexLen; // Length of the index in words Uint32 m_theIndexLen; // Length of the index in words
Uint32 m_theNoOfIndexDefined; // The number of index attributes Uint32 m_theNoOfIndexDefined; // The number of index attributes
friend struct Ndb_free_list_t<NdbIndexOperation>;
}; };
#endif #endif
...@@ -132,6 +132,8 @@ private: ...@@ -132,6 +132,8 @@ private:
int compare(Uint32 key, Uint32 cols, const NdbReceiver*, const NdbReceiver*); int compare(Uint32 key, Uint32 cols, const NdbReceiver*, const NdbReceiver*);
Uint32 m_sort_columns; Uint32 m_sort_columns;
friend struct Ndb_free_list_t<NdbIndexScanOperation>;
}; };
#endif #endif
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "NdbError.hpp" #include "NdbError.hpp"
#include "NdbReceiver.hpp" #include "NdbReceiver.hpp"
#include "NdbDictionary.hpp" #include "NdbDictionary.hpp"
#include "Ndb.hpp"
class Ndb; class Ndb;
class NdbApiSignal; class NdbApiSignal;
...@@ -723,8 +724,6 @@ protected: ...@@ -723,8 +724,6 @@ protected:
/****************************************************************************** /******************************************************************************
* These are the methods used to create and delete the NdbOperation objects. * These are the methods used to create and delete the NdbOperation objects.
*****************************************************************************/ *****************************************************************************/
NdbOperation(Ndb* aNdb);
virtual ~NdbOperation();
bool needReply(); bool needReply();
/****************************************************************************** /******************************************************************************
...@@ -736,8 +735,9 @@ protected: ...@@ -736,8 +735,9 @@ protected:
int init(const class NdbTableImpl*, NdbConnection* aCon); int init(const class NdbTableImpl*, NdbConnection* aCon);
void initInterpreter(); void initInterpreter();
NdbOperation(Ndb* aNdb);
virtual ~NdbOperation();
void next(NdbOperation*); // Set next pointer void next(NdbOperation*); // Set next pointer
NdbOperation* next(); // Get next pointer NdbOperation* next(); // Get next pointer
enum OperationStatus{ enum OperationStatus{
...@@ -925,6 +925,8 @@ protected: ...@@ -925,6 +925,8 @@ protected:
* IgnoreError on connection level. * IgnoreError on connection level.
*/ */
Int8 m_abortOption; Int8 m_abortOption;
friend struct Ndb_free_list_t<NdbOperation>;
}; };
#ifdef NDB_NO_DROPPED_SIGNAL #ifdef NDB_NO_DROPPED_SIGNAL
......
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
#ifndef NdbRecAttr_H #ifndef NdbRecAttr_H
#define NdbRecAttr_H #define NdbRecAttr_H
#include <NdbDictionary.hpp> #include "NdbDictionary.hpp"
#include "Ndb.hpp"
class NdbOperation; class NdbOperation;
...@@ -242,7 +243,6 @@ public: ...@@ -242,7 +243,6 @@ public:
*/ */
~NdbRecAttr(); ~NdbRecAttr();
private: private:
NdbRecAttr();
Uint32 attrId() const; /* Get attribute id */ Uint32 attrId() const; /* Get attribute id */
bool setNULL(); /* Set NULL indicator */ bool setNULL(); /* Set NULL indicator */
...@@ -251,6 +251,7 @@ private: ...@@ -251,6 +251,7 @@ private:
void release(); /* Release memory if allocated */ void release(); /* Release memory if allocated */
void init(); /* Initialise object when allocated */ void init(); /* Initialise object when allocated */
NdbRecAttr(Ndb*);
void next(NdbRecAttr* aRecAttr); void next(NdbRecAttr* aRecAttr);
NdbRecAttr* next() const; NdbRecAttr* next() const;
...@@ -273,6 +274,8 @@ private: ...@@ -273,6 +274,8 @@ private:
Uint32 theAttrSize; Uint32 theAttrSize;
Uint32 theArraySize; Uint32 theArraySize;
const NdbDictionary::Column* m_column; const NdbDictionary::Column* m_column;
friend struct Ndb_free_list_t<NdbRecAttr>;
}; };
inline inline
......
...@@ -62,6 +62,25 @@ NdbApiSignal::NdbApiSignal(BlockReference ref) ...@@ -62,6 +62,25 @@ NdbApiSignal::NdbApiSignal(BlockReference ref)
theNextSignal = 0; theNextSignal = 0;
} }
NdbApiSignal::NdbApiSignal(Ndb* ndb)
{
BlockReference ref = ndb->theMyRef;
theVerId_signalNumber = 0; // 4 bit ver id - 16 bit gsn
theReceiversBlockNumber = 0; // Only 16 bit blocknum
theSendersBlockRef = refToBlock(ref);
theLength = 0;
theSendersSignalId = 0;
theSignalId = 0;
theTrace = 0;
m_noOfSections = 0;
m_fragmentInfo = 0;
for (int i = 0; i < 25; i++)
theData[i] = 0x13579753;
setDataPtr(&theData[0]);
theNextSignal = 0;
}
/** /**
* Copy constructor * Copy constructor
*/ */
......
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
class NdbApiSignal : public SignalHeader class NdbApiSignal : public SignalHeader
{ {
public: public:
NdbApiSignal(BlockReference myRef); NdbApiSignal(Ndb* ndb);
NdbApiSignal(BlockReference ref);
NdbApiSignal(const NdbApiSignal &); NdbApiSignal(const NdbApiSignal &);
NdbApiSignal(const SignalHeader &header) NdbApiSignal(const SignalHeader &header)
: SignalHeader(header), theNextSignal(0), theRealData(0) {}; : SignalHeader(header), theNextSignal(0), theRealData(0) {};
......
...@@ -137,7 +137,7 @@ NdbBlob::getBlobTable(NdbTableImpl& bt, const NdbTableImpl* t, const NdbColumnIm ...@@ -137,7 +137,7 @@ NdbBlob::getBlobTable(NdbTableImpl& bt, const NdbTableImpl* t, const NdbColumnIm
// initialization // initialization
NdbBlob::NdbBlob() NdbBlob::NdbBlob(Ndb*)
{ {
init(); init();
} }
......
...@@ -32,6 +32,21 @@ ...@@ -32,6 +32,21 @@
#include "NdbDictionaryImpl.hpp" #include "NdbDictionaryImpl.hpp"
#include "ObjectMap.hpp" #include "ObjectMap.hpp"
template <class T>
struct Ndb_free_list_t
{
Ndb_free_list_t();
~Ndb_free_list_t();
void fill(Ndb*, Uint32 cnt);
T* seize(Ndb*);
void release(T*);
void clear();
Uint32 get_sizeof() const { return sizeof(T); }
T * m_free_list;
Uint32 m_alloc_cnt, m_free_cnt;
};
/** /**
* Private parts of the Ndb object (corresponding to Ndb.hpp in public API) * Private parts of the Ndb object (corresponding to Ndb.hpp in public API)
*/ */
...@@ -59,6 +74,23 @@ public: ...@@ -59,6 +74,23 @@ public:
NdbWaiter theWaiter; NdbWaiter theWaiter;
int m_optimized_node_selection; int m_optimized_node_selection;
/**
* NOTE free lists must be _after_ theNdbObjectIdMap take
* assure that destructors are run in correct order
*/
Ndb_free_list_t<NdbConnection> theConIdleList;
Ndb_free_list_t<NdbOperation> theOpIdleList;
Ndb_free_list_t<NdbIndexScanOperation> theScanOpIdleList;
Ndb_free_list_t<NdbIndexOperation> theIndexOpIdleList;
Ndb_free_list_t<NdbRecAttr> theRecAttrIdleList;
Ndb_free_list_t<NdbApiSignal> theSignalIdleList;
Ndb_free_list_t<NdbLabel> theLabelList;
Ndb_free_list_t<NdbBranch> theBranchList;
Ndb_free_list_t<NdbSubroutine> theSubroutineList;
Ndb_free_list_t<NdbCall> theCallList;
Ndb_free_list_t<NdbBlob> theNdbBlobIdleList;
Ndb_free_list_t<NdbReceiver> theScanList;
}; };
#ifdef VM_TRACE #ifdef VM_TRACE
...@@ -133,4 +165,91 @@ enum LockMode { ...@@ -133,4 +165,91 @@ enum LockMode {
Delete Delete
}; };
template<class T>
inline
Ndb_free_list_t<T>::Ndb_free_list_t()
{
m_free_list= 0;
m_alloc_cnt= m_free_cnt= 0;
}
template<class T>
inline
Ndb_free_list_t<T>::~Ndb_free_list_t()
{
clear();
}
template<class T>
inline
void
Ndb_free_list_t<T>::fill(Ndb* ndb, Uint32 cnt)
{
if (m_free_list == 0)
{
m_free_cnt++;
m_alloc_cnt++;
m_free_list = new T(ndb);
}
while(m_alloc_cnt < cnt)
{
T* obj= new T(ndb);
if(obj == 0)
return;
obj->next(m_free_list);
m_free_cnt++;
m_alloc_cnt++;
m_free_list = obj;
}
}
template<class T>
inline
T*
Ndb_free_list_t<T>::seize(Ndb* ndb)
{
T* tmp = m_free_list;
if (tmp)
{
m_free_list = (T*)tmp->next();
tmp->next(NULL);
m_free_cnt--;
return tmp;
}
if((tmp = new T(ndb)))
{
m_alloc_cnt++;
}
return tmp;
}
template<class T>
inline
void
Ndb_free_list_t<T>::release(T* obj)
{
obj->next(m_free_list);
m_free_list = obj;
m_free_cnt++;
}
template<class T>
inline
void
Ndb_free_list_t<T>::clear()
{
T* obj = m_free_list;
while(obj)
{
T* curr = obj;
obj = (T*)obj->next();
delete curr;
m_alloc_cnt--;
}
}
#endif #endif
...@@ -33,7 +33,7 @@ Adjust: 971206 UABRONM First version ...@@ -33,7 +33,7 @@ Adjust: 971206 UABRONM First version
#include "NdbDictionaryImpl.hpp" #include "NdbDictionaryImpl.hpp"
#include <NdbTCP.h> #include <NdbTCP.h>
NdbRecAttr::NdbRecAttr() NdbRecAttr::NdbRecAttr(Ndb*)
{ {
init(); init();
} }
...@@ -109,7 +109,7 @@ NdbRecAttr::copyout() ...@@ -109,7 +109,7 @@ NdbRecAttr::copyout()
NdbRecAttr * NdbRecAttr *
NdbRecAttr::clone() const { NdbRecAttr::clone() const {
NdbRecAttr * ret = new NdbRecAttr(); NdbRecAttr * ret = new NdbRecAttr(0);
ret->theAttrId = theAttrId; ret->theAttrId = theAttrId;
ret->theNULLind = theNULLind; ret->theNULLind = theNULLind;
......
...@@ -30,8 +30,7 @@ Adjust: 991029 UABRONM First version. ...@@ -30,8 +30,7 @@ Adjust: 991029 UABRONM First version.
#include "NdbUtil.hpp" #include "NdbUtil.hpp"
NdbLabel::NdbLabel() : NdbLabel::NdbLabel(Ndb*)
theNext(NULL)
{ {
} }
...@@ -39,8 +38,7 @@ NdbLabel::~NdbLabel() ...@@ -39,8 +38,7 @@ NdbLabel::~NdbLabel()
{ {
} }
NdbSubroutine::NdbSubroutine() : NdbSubroutine::NdbSubroutine(Ndb*)
theNext(NULL)
{ {
} }
...@@ -48,9 +46,8 @@ NdbSubroutine::~NdbSubroutine() ...@@ -48,9 +46,8 @@ NdbSubroutine::~NdbSubroutine()
{ {
} }
NdbBranch::NdbBranch() : NdbBranch::NdbBranch(Ndb*) :
theSignal(NULL), theSignal(NULL)
theNext(NULL)
{ {
} }
...@@ -58,9 +55,8 @@ NdbBranch::~NdbBranch() ...@@ -58,9 +55,8 @@ NdbBranch::~NdbBranch()
{ {
} }
NdbCall::NdbCall() : NdbCall::NdbCall(Ndb*) :
theSignal(NULL), theSignal(NULL)
theNext(NULL)
{ {
} }
......
...@@ -34,41 +34,49 @@ Comment: ...@@ -34,41 +34,49 @@ Comment:
class NdbApiSignal; class NdbApiSignal;
class NdbOperation; class NdbOperation;
class NdbLabel template<class T>
struct Free_list_element
{
Free_list_element() { theNext = 0;}
void next(T* obj) { theNext = obj;}
T* next() { return theNext;}
T* theNext;
};
class NdbLabel : public Free_list_element<NdbLabel>
{ {
friend class NdbOperation; friend class NdbOperation;
friend class Ndb; friend class Ndb;
public:
private: NdbLabel(Ndb*);
NdbLabel();
~NdbLabel(); ~NdbLabel();
NdbLabel* theNext; private:
Uint32 theSubroutine[16]; Uint32 theSubroutine[16];
Uint32 theLabelAddress[16]; Uint32 theLabelAddress[16];
Uint32 theLabelNo[16]; Uint32 theLabelNo[16];
}; };
class NdbSubroutine class NdbSubroutine : public Free_list_element<NdbSubroutine>
{ {
friend class NdbOperation; friend class NdbOperation;
friend class Ndb; friend class Ndb;
private: public:
NdbSubroutine(); NdbSubroutine(Ndb*);
~NdbSubroutine(); ~NdbSubroutine();
NdbSubroutine* theNext;
Uint32 theSubroutineAddress[16]; Uint32 theSubroutineAddress[16];
}; };
class NdbBranch class NdbBranch : public Free_list_element<NdbBranch>
{ {
friend class NdbOperation; friend class NdbOperation;
friend class Ndb; friend class Ndb;
private: public:
NdbBranch(); NdbBranch(Ndb*);
~NdbBranch(); ~NdbBranch();
NdbApiSignal* theSignal; NdbApiSignal* theSignal;
...@@ -76,22 +84,20 @@ private: ...@@ -76,22 +84,20 @@ private:
Uint32 theBranchAddress; Uint32 theBranchAddress;
Uint32 theBranchLabel; Uint32 theBranchLabel;
Uint32 theSubroutine; Uint32 theSubroutine;
NdbBranch* theNext;
}; };
class NdbCall class NdbCall : public Free_list_element<NdbCall>
{ {
friend class NdbOperation; friend class NdbOperation;
friend class Ndb; friend class Ndb;
private: public:
NdbCall(); NdbCall(Ndb*);
~NdbCall(); ~NdbCall();
NdbApiSignal* theSignal; NdbApiSignal* theSignal;
Uint32 theSignalAddress; Uint32 theSignalAddress;
Uint32 theSubroutine; Uint32 theSubroutine;
NdbCall* theNext;
}; };
#endif #endif
...@@ -143,15 +143,6 @@ Ndb::init(int aMaxNoOfTransactions) ...@@ -143,15 +143,6 @@ Ndb::init(int aMaxNoOfTransactions)
error_handler: error_handler:
ndbout << "error_handler" << endl; ndbout << "error_handler" << endl;
releaseTransactionArrays(); releaseTransactionArrays();
while ( theConIdleList != NULL )
freeNdbCon();
while ( theSignalIdleList != NULL )
freeSignal();
while (theRecAttrIdleList != NULL)
freeRecAttr();
while (theOpIdleList != NULL)
freeOperation();
delete theDictionary; delete theDictionary;
TransporterFacade::instance()->close(theNdbBlockNumber, 0); TransporterFacade::instance()->close(theNdbBlockNumber, 0);
DBUG_RETURN(-1); DBUG_RETURN(-1);
......
...@@ -99,20 +99,8 @@ void Ndb::setup(Ndb_cluster_connection *ndb_cluster_connection, ...@@ -99,20 +99,8 @@ void Ndb::setup(Ndb_cluster_connection *ndb_cluster_connection,
theMaxNoOfTransactions= 0; theMaxNoOfTransactions= 0;
theMinNoOfEventsToWakeUp= 0; theMinNoOfEventsToWakeUp= 0;
prefixEnd= NULL; prefixEnd= NULL;
theConIdleList= NULL;
theOpIdleList= NULL;
theScanOpIdleList= NULL;
theIndexOpIdleList= NULL;
theTransactionList= NULL; theTransactionList= NULL;
theConnectionArray= NULL; theConnectionArray= NULL;
theRecAttrIdleList= NULL;
theSignalIdleList= NULL;
theLabelList= NULL;
theBranchList= NULL;
theSubroutineList= NULL;
theCallList= NULL;
theScanList= NULL;
theNdbBlobIdleList= NULL;
the_last_check_time= 0; the_last_check_time= 0;
theFirstTransId= 0; theFirstTransId= 0;
theRestartGCI= 0; theRestartGCI= 0;
...@@ -204,33 +192,6 @@ Ndb::~Ndb() ...@@ -204,33 +192,6 @@ Ndb::~Ndb()
TransporterFacade::instance()->close(theNdbBlockNumber, theFirstTransId); TransporterFacade::instance()->close(theNdbBlockNumber, theFirstTransId);
} }
// if (theSchemaConToNdbList != NULL)
// closeSchemaTransaction(theSchemaConToNdbList);
while ( theConIdleList != NULL )
freeNdbCon();
while (theOpIdleList != NULL)
freeOperation();
while (theScanOpIdleList != NULL)
freeScanOperation();
while (theIndexOpIdleList != NULL)
freeIndexOperation();
while (theLabelList != NULL)
freeNdbLabel();
while (theBranchList != NULL)
freeNdbBranch();
while (theSubroutineList != NULL)
freeNdbSubroutine();
while (theCallList != NULL)
freeNdbCall();
while (theScanList != NULL)
freeNdbScanRec();
while (theNdbBlobIdleList != NULL)
freeNdbBlob();
while (theRecAttrIdleList != NULL)
freeRecAttr();
while ( theSignalIdleList != NULL )
freeSignal();
releaseTransactionArrays(); releaseTransactionArrays();
delete []theConnectionArray; delete []theConnectionArray;
......
This diff is collapsed.
...@@ -869,7 +869,7 @@ operator<<(NdbOut& ndbout, const AttributeS& attr){ ...@@ -869,7 +869,7 @@ operator<<(NdbOut& ndbout, const AttributeS& attr){
return ndbout; return ndbout;
} }
NdbRecAttr tmprec; NdbRecAttr tmprec(0);
tmprec.setup(desc.m_column, (char *)data.void_value); tmprec.setup(desc.m_column, (char *)data.void_value);
ndbout << tmprec; ndbout << tmprec;
......
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