Merge perch.ndb.mysql.com:/home/jonas/src/mysql-4.1
into perch.ndb.mysql.com:/home/jonas/src/mysql-4.1-push
This commit is contained in:
commit
f12f98e226
@ -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:
|
|||||||
*/
|
*/
|
||||||
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:
|
|||||||
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:
|
|||||||
// 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:
|
|||||||
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 @@
|
|||||||
#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:
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* 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:
|
|||||||
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:
|
|||||||
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:
|
|||||||
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:
|
|||||||
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 @@
|
|||||||
#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:
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* 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:
|
|||||||
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:
|
|||||||
* 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 @@
|
|||||||
#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:
|
|||||||
*/
|
*/
|
||||||
~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:
|
|||||||
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:
|
|||||||
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)
|
|||||||
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 @@
|
|||||||
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
|
|||||||
|
|
||||||
// initialization
|
// initialization
|
||||||
|
|
||||||
NdbBlob::NdbBlob()
|
NdbBlob::NdbBlob(Ndb*)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
@ -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:
|
|||||||
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 {
|
|||||||
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
|
|||||||
#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()
|
|||||||
|
|
||||||
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 @@ Comment:
|
|||||||
|
|
||||||
#include "NdbUtil.hpp"
|
#include "NdbUtil.hpp"
|
||||||
|
|
||||||
NdbLabel::NdbLabel() :
|
NdbLabel::NdbLabel(Ndb*)
|
||||||
theNext(NULL)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,8 +38,7 @@ NdbLabel::~NdbLabel()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
NdbSubroutine::NdbSubroutine() :
|
NdbSubroutine::NdbSubroutine(Ndb*)
|
||||||
theNext(NULL)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,9 +46,8 @@ NdbSubroutine::~NdbSubroutine()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
NdbBranch::NdbBranch() :
|
NdbBranch::NdbBranch(Ndb*) :
|
||||||
theSignal(NULL),
|
theSignal(NULL)
|
||||||
theNext(NULL)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,9 +55,8 @@ NdbBranch::~NdbBranch()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
NdbCall::NdbCall() :
|
NdbCall::NdbCall(Ndb*) :
|
||||||
theSignal(NULL),
|
theSignal(NULL)
|
||||||
theNext(NULL)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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:
|
|||||||
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)
|
|||||||
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,
|
|||||||
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()
|
|||||||
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;
|
||||||
|
@ -76,25 +76,7 @@ Ndb::checkFailedNode()
|
|||||||
int
|
int
|
||||||
Ndb::createConIdleList(int aNrOfCon)
|
Ndb::createConIdleList(int aNrOfCon)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < aNrOfCon; i++)
|
theImpl->theConIdleList.fill(this, aNrOfCon);
|
||||||
{
|
|
||||||
NdbConnection* tNdbCon = new NdbConnection(this);
|
|
||||||
if (tNdbCon == NULL)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (theConIdleList == NULL)
|
|
||||||
{
|
|
||||||
theConIdleList = tNdbCon;
|
|
||||||
theConIdleList->next(NULL);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
tNdbCon->next(theConIdleList);
|
|
||||||
theConIdleList = tNdbCon;
|
|
||||||
}
|
|
||||||
tNdbCon->Status(NdbConnection::NotConnected);
|
|
||||||
}
|
|
||||||
theNoOfAllocatedTransactions = aNrOfCon;
|
|
||||||
return aNrOfCon;
|
return aNrOfCon;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,19 +92,7 @@ Ndb::createConIdleList(int aNrOfCon)
|
|||||||
int
|
int
|
||||||
Ndb::createOpIdleList(int aNrOfOp)
|
Ndb::createOpIdleList(int aNrOfOp)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < aNrOfOp; i++){
|
theImpl->theOpIdleList.fill(this, aNrOfOp);
|
||||||
NdbOperation* tOp = new NdbOperation(this);
|
|
||||||
if ( tOp == NULL ){
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (theOpIdleList == NULL){
|
|
||||||
theOpIdleList = tOp;
|
|
||||||
theOpIdleList->next(NULL);
|
|
||||||
} else{
|
|
||||||
tOp->next(theOpIdleList);
|
|
||||||
theOpIdleList = tOp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return aNrOfOp;
|
return aNrOfOp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,22 +106,7 @@ Ndb::createOpIdleList(int aNrOfOp)
|
|||||||
NdbBranch*
|
NdbBranch*
|
||||||
Ndb::getNdbBranch()
|
Ndb::getNdbBranch()
|
||||||
{
|
{
|
||||||
NdbBranch* tNdbBranch;
|
return theImpl->theBranchList.seize(this);
|
||||||
if ( theBranchList == NULL )
|
|
||||||
{
|
|
||||||
tNdbBranch = new NdbBranch;
|
|
||||||
if (tNdbBranch == NULL)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
tNdbBranch->theNext = NULL;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
tNdbBranch = theBranchList;
|
|
||||||
theBranchList = tNdbBranch->theNext;
|
|
||||||
tNdbBranch->theNext = NULL;
|
|
||||||
}
|
|
||||||
return tNdbBranch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -164,22 +119,7 @@ Ndb::getNdbBranch()
|
|||||||
NdbCall*
|
NdbCall*
|
||||||
Ndb::getNdbCall()
|
Ndb::getNdbCall()
|
||||||
{
|
{
|
||||||
NdbCall* tNdbCall;
|
return theImpl->theCallList.seize(this);
|
||||||
if ( theCallList == NULL )
|
|
||||||
{
|
|
||||||
tNdbCall = new NdbCall;
|
|
||||||
if (tNdbCall == NULL)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
tNdbCall->theNext = NULL;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
tNdbCall = theCallList;
|
|
||||||
theCallList = tNdbCall->theNext;
|
|
||||||
tNdbCall->theNext = NULL;
|
|
||||||
}
|
|
||||||
return tNdbCall;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -192,25 +132,14 @@ Ndb::getNdbCall()
|
|||||||
NdbConnection*
|
NdbConnection*
|
||||||
Ndb::getNdbCon()
|
Ndb::getNdbCon()
|
||||||
{
|
{
|
||||||
NdbConnection* tNdbCon;
|
NdbConnection* tNdbCon = theImpl->theConIdleList.seize(this);
|
||||||
if ( theConIdleList == NULL ) {
|
if (unlikely(theImpl->theConIdleList.m_alloc_cnt > theMaxNoOfTransactions))
|
||||||
if (theNoOfAllocatedTransactions < theMaxNoOfTransactions) {
|
|
||||||
tNdbCon = new NdbConnection(this);
|
|
||||||
if (tNdbCon == NULL) {
|
|
||||||
return NULL;
|
|
||||||
}//if
|
|
||||||
theNoOfAllocatedTransactions++;
|
|
||||||
} else {
|
|
||||||
ndbout << "theNoOfAllocatedTransactions = " << theNoOfAllocatedTransactions << " theMaxNoOfTransactions = " << theMaxNoOfTransactions << endl;
|
|
||||||
return NULL;
|
|
||||||
}//if
|
|
||||||
tNdbCon->next(NULL);
|
|
||||||
} else
|
|
||||||
{
|
{
|
||||||
tNdbCon = theConIdleList;
|
theImpl->theConIdleList.release(tNdbCon);
|
||||||
theConIdleList = tNdbCon->next();
|
ndbout << "theNoOfAllocatedTransactions = " << theNoOfAllocatedTransactions << " theMaxNoOfTransactions = " << theMaxNoOfTransactions << endl;
|
||||||
tNdbCon->next(NULL);
|
return NULL;
|
||||||
}
|
}//if
|
||||||
|
|
||||||
tNdbCon->theMagicNumber = 0x37412619;
|
tNdbCon->theMagicNumber = 0x37412619;
|
||||||
return tNdbCon;
|
return tNdbCon;
|
||||||
}
|
}
|
||||||
@ -225,22 +154,7 @@ Ndb::getNdbCon()
|
|||||||
NdbLabel*
|
NdbLabel*
|
||||||
Ndb::getNdbLabel()
|
Ndb::getNdbLabel()
|
||||||
{
|
{
|
||||||
NdbLabel* tNdbLabel;
|
return theImpl->theLabelList.seize(this);
|
||||||
if ( theLabelList == NULL )
|
|
||||||
{
|
|
||||||
tNdbLabel = new NdbLabel;
|
|
||||||
if (tNdbLabel == NULL)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
tNdbLabel->theNext = NULL;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
tNdbLabel = theLabelList;
|
|
||||||
theLabelList = tNdbLabel->theNext;
|
|
||||||
tNdbLabel->theNext = NULL;
|
|
||||||
}
|
|
||||||
return tNdbLabel;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -254,23 +168,7 @@ Ndb::getNdbLabel()
|
|||||||
NdbReceiver*
|
NdbReceiver*
|
||||||
Ndb::getNdbScanRec()
|
Ndb::getNdbScanRec()
|
||||||
{
|
{
|
||||||
NdbReceiver* tNdbScanRec;
|
return theImpl->theScanList.seize(this);
|
||||||
if ( theScanList == NULL )
|
|
||||||
{
|
|
||||||
tNdbScanRec = new NdbReceiver(this);
|
|
||||||
if (tNdbScanRec == NULL)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
tNdbScanRec->next(NULL);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
tNdbScanRec = theScanList;
|
|
||||||
theScanList = tNdbScanRec->next();
|
|
||||||
tNdbScanRec->next(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
return tNdbScanRec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -283,22 +181,7 @@ Ndb::getNdbScanRec()
|
|||||||
NdbSubroutine*
|
NdbSubroutine*
|
||||||
Ndb::getNdbSubroutine()
|
Ndb::getNdbSubroutine()
|
||||||
{
|
{
|
||||||
NdbSubroutine* tNdbSubroutine;
|
return theImpl->theSubroutineList.seize(this);
|
||||||
if ( theSubroutineList == NULL )
|
|
||||||
{
|
|
||||||
tNdbSubroutine = new NdbSubroutine;
|
|
||||||
if (tNdbSubroutine == NULL)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
tNdbSubroutine->theNext = NULL;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
tNdbSubroutine = theSubroutineList;
|
|
||||||
theSubroutineList = tNdbSubroutine->theNext;
|
|
||||||
tNdbSubroutine->theNext = NULL;
|
|
||||||
}
|
|
||||||
return tNdbSubroutine;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -311,18 +194,7 @@ Remark: Get an operation from theOpIdleList and return the object .
|
|||||||
NdbOperation*
|
NdbOperation*
|
||||||
Ndb::getOperation()
|
Ndb::getOperation()
|
||||||
{
|
{
|
||||||
NdbOperation* tOp = theOpIdleList;
|
return theImpl->theOpIdleList.seize(this);
|
||||||
if (tOp != NULL ) {
|
|
||||||
NdbOperation* tOpNext = tOp->next();
|
|
||||||
tOp->next(NULL);
|
|
||||||
theOpIdleList = tOpNext;
|
|
||||||
return tOp;
|
|
||||||
} else {
|
|
||||||
tOp = new NdbOperation(this);
|
|
||||||
if (tOp != NULL)
|
|
||||||
tOp->next(NULL);
|
|
||||||
}
|
|
||||||
return tOp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -335,18 +207,7 @@ Remark: Get an operation from theScanOpIdleList and return the object .
|
|||||||
NdbIndexScanOperation*
|
NdbIndexScanOperation*
|
||||||
Ndb::getScanOperation()
|
Ndb::getScanOperation()
|
||||||
{
|
{
|
||||||
NdbIndexScanOperation* tOp = theScanOpIdleList;
|
return theImpl->theScanOpIdleList.seize(this);
|
||||||
if (tOp != NULL ) {
|
|
||||||
NdbIndexScanOperation* tOpNext = (NdbIndexScanOperation*)tOp->next();
|
|
||||||
tOp->next(NULL);
|
|
||||||
theScanOpIdleList = tOpNext;
|
|
||||||
return tOp;
|
|
||||||
} else {
|
|
||||||
tOp = new NdbIndexScanOperation(this);
|
|
||||||
if (tOp != NULL)
|
|
||||||
tOp->next(NULL);
|
|
||||||
}
|
|
||||||
return tOp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -359,18 +220,7 @@ Remark: Get an operation from theIndexOpIdleList and return the object .
|
|||||||
NdbIndexOperation*
|
NdbIndexOperation*
|
||||||
Ndb::getIndexOperation()
|
Ndb::getIndexOperation()
|
||||||
{
|
{
|
||||||
NdbIndexOperation* tOp = theIndexOpIdleList;
|
return theImpl->theIndexOpIdleList.seize(this);
|
||||||
if (tOp != NULL ) {
|
|
||||||
NdbIndexOperation* tOpNext = (NdbIndexOperation*) tOp->next();
|
|
||||||
tOp->next(NULL);
|
|
||||||
theIndexOpIdleList = tOpNext;
|
|
||||||
return tOp;
|
|
||||||
} else {
|
|
||||||
tOp = new NdbIndexOperation(this);
|
|
||||||
if (tOp != NULL)
|
|
||||||
tOp->next(NULL);
|
|
||||||
}
|
|
||||||
return tOp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -382,21 +232,14 @@ Return Value: Return a reference to a receive attribute object.
|
|||||||
NdbRecAttr*
|
NdbRecAttr*
|
||||||
Ndb::getRecAttr()
|
Ndb::getRecAttr()
|
||||||
{
|
{
|
||||||
NdbRecAttr* tRecAttr;
|
NdbRecAttr* tRecAttr = theImpl->theRecAttrIdleList.seize(this);
|
||||||
tRecAttr = theRecAttrIdleList;
|
if (tRecAttr != NULL)
|
||||||
if (tRecAttr != NULL) {
|
{
|
||||||
NdbRecAttr* tRecAttrNext = tRecAttr->next();
|
|
||||||
tRecAttr->init();
|
tRecAttr->init();
|
||||||
theRecAttrIdleList = tRecAttrNext;
|
|
||||||
return tRecAttr;
|
return tRecAttr;
|
||||||
} else {
|
}
|
||||||
tRecAttr = new NdbRecAttr;
|
|
||||||
if (tRecAttr == NULL)
|
return NULL;
|
||||||
return NULL;
|
|
||||||
tRecAttr->next(NULL);
|
|
||||||
}//if
|
|
||||||
tRecAttr->init();
|
|
||||||
return tRecAttr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -408,34 +251,16 @@ Return Value: Return a reference to a signal object.
|
|||||||
NdbApiSignal*
|
NdbApiSignal*
|
||||||
Ndb::getSignal()
|
Ndb::getSignal()
|
||||||
{
|
{
|
||||||
NdbApiSignal* tSignal = theSignalIdleList;
|
return theImpl->theSignalIdleList.seize(this);
|
||||||
if (tSignal != NULL){
|
|
||||||
NdbApiSignal* tSignalNext = tSignal->next();
|
|
||||||
tSignal->next(NULL);
|
|
||||||
theSignalIdleList = tSignalNext;
|
|
||||||
} else {
|
|
||||||
tSignal = new NdbApiSignal(theMyRef);
|
|
||||||
#ifdef POORMANSPURIFY
|
|
||||||
cnewSignals++;
|
|
||||||
#endif
|
|
||||||
if (tSignal != NULL)
|
|
||||||
tSignal->next(NULL);
|
|
||||||
}
|
|
||||||
#ifdef POORMANSPURIFY
|
|
||||||
cgetSignals++;
|
|
||||||
#endif
|
|
||||||
return tSignal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NdbBlob*
|
NdbBlob*
|
||||||
Ndb::getNdbBlob()
|
Ndb::getNdbBlob()
|
||||||
{
|
{
|
||||||
NdbBlob* tBlob = theNdbBlobIdleList;
|
NdbBlob* tBlob = theImpl->theNdbBlobIdleList.seize(this);
|
||||||
if (tBlob != NULL) {
|
if(tBlob)
|
||||||
theNdbBlobIdleList = tBlob->theNext;
|
{
|
||||||
tBlob->init();
|
tBlob->init();
|
||||||
} else {
|
|
||||||
tBlob = new NdbBlob;
|
|
||||||
}
|
}
|
||||||
return tBlob;
|
return tBlob;
|
||||||
}
|
}
|
||||||
@ -449,8 +274,7 @@ Remark: Add a NdbBranch object into the Branch idlelist.
|
|||||||
void
|
void
|
||||||
Ndb::releaseNdbBranch(NdbBranch* aNdbBranch)
|
Ndb::releaseNdbBranch(NdbBranch* aNdbBranch)
|
||||||
{
|
{
|
||||||
aNdbBranch->theNext = theBranchList;
|
theImpl->theBranchList.release(aNdbBranch);
|
||||||
theBranchList = aNdbBranch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -462,8 +286,7 @@ Remark: Add a NdbBranch object into the Branch idlelist.
|
|||||||
void
|
void
|
||||||
Ndb::releaseNdbCall(NdbCall* aNdbCall)
|
Ndb::releaseNdbCall(NdbCall* aNdbCall)
|
||||||
{
|
{
|
||||||
aNdbCall->theNext = theCallList;
|
theImpl->theCallList.release(aNdbCall);
|
||||||
theCallList = aNdbCall;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -475,9 +298,8 @@ Remark: Add a Connection object into the signal idlelist.
|
|||||||
void
|
void
|
||||||
Ndb::releaseNdbCon(NdbConnection* aNdbCon)
|
Ndb::releaseNdbCon(NdbConnection* aNdbCon)
|
||||||
{
|
{
|
||||||
aNdbCon->next(theConIdleList);
|
|
||||||
aNdbCon->theMagicNumber = 0xFE11DD;
|
aNdbCon->theMagicNumber = 0xFE11DD;
|
||||||
theConIdleList = aNdbCon;
|
theImpl->theConIdleList.release(aNdbCon);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -489,8 +311,7 @@ Remark: Add a NdbLabel object into the Label idlelist.
|
|||||||
void
|
void
|
||||||
Ndb::releaseNdbLabel(NdbLabel* aNdbLabel)
|
Ndb::releaseNdbLabel(NdbLabel* aNdbLabel)
|
||||||
{
|
{
|
||||||
aNdbLabel->theNext = theLabelList;
|
theImpl->theLabelList.release(aNdbLabel);
|
||||||
theLabelList = aNdbLabel;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -502,8 +323,7 @@ Remark: Add a NdbScanReceiver object into the Scan idlelist.
|
|||||||
void
|
void
|
||||||
Ndb::releaseNdbScanRec(NdbReceiver* aNdbScanRec)
|
Ndb::releaseNdbScanRec(NdbReceiver* aNdbScanRec)
|
||||||
{
|
{
|
||||||
aNdbScanRec->next(theScanList);
|
theImpl->theScanList.release(aNdbScanRec);
|
||||||
theScanList = aNdbScanRec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -515,8 +335,7 @@ Remark: Add a NdbSubroutine object into theSubroutine idlelist.
|
|||||||
void
|
void
|
||||||
Ndb::releaseNdbSubroutine(NdbSubroutine* aNdbSubroutine)
|
Ndb::releaseNdbSubroutine(NdbSubroutine* aNdbSubroutine)
|
||||||
{
|
{
|
||||||
aNdbSubroutine->theNext = theSubroutineList;
|
theImpl->theSubroutineList.release(aNdbSubroutine);
|
||||||
theSubroutineList = aNdbSubroutine;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -529,16 +348,14 @@ void
|
|||||||
Ndb::releaseOperation(NdbOperation* anOperation)
|
Ndb::releaseOperation(NdbOperation* anOperation)
|
||||||
{
|
{
|
||||||
if(anOperation->m_tcReqGSN == GSN_TCKEYREQ){
|
if(anOperation->m_tcReqGSN == GSN_TCKEYREQ){
|
||||||
anOperation->next(theOpIdleList);
|
|
||||||
anOperation->theNdbCon = NULL;
|
anOperation->theNdbCon = NULL;
|
||||||
anOperation->theMagicNumber = 0xFE11D0;
|
anOperation->theMagicNumber = 0xFE11D0;
|
||||||
theOpIdleList = anOperation;
|
theImpl->theOpIdleList.release(anOperation);
|
||||||
} else {
|
} else {
|
||||||
assert(anOperation->m_tcReqGSN == GSN_TCINDXREQ);
|
assert(anOperation->m_tcReqGSN == GSN_TCINDXREQ);
|
||||||
anOperation->next(theIndexOpIdleList);
|
|
||||||
anOperation->theNdbCon = NULL;
|
anOperation->theNdbCon = NULL;
|
||||||
anOperation->theMagicNumber = 0xFE11D1;
|
anOperation->theMagicNumber = 0xFE11D1;
|
||||||
theIndexOpIdleList = (NdbIndexOperation*)anOperation;
|
theImpl->theIndexOpIdleList.release((NdbIndexOperation*)anOperation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,10 +368,9 @@ Remark: Add a NdbScanOperation object into the signal idlelist.
|
|||||||
void
|
void
|
||||||
Ndb::releaseScanOperation(NdbIndexScanOperation* aScanOperation)
|
Ndb::releaseScanOperation(NdbIndexScanOperation* aScanOperation)
|
||||||
{
|
{
|
||||||
aScanOperation->next(theScanOpIdleList);
|
|
||||||
aScanOperation->theNdbCon = NULL;
|
aScanOperation->theNdbCon = NULL;
|
||||||
aScanOperation->theMagicNumber = 0xFE11D2;
|
aScanOperation->theMagicNumber = 0xFE11D2;
|
||||||
theScanOpIdleList = aScanOperation;
|
theImpl->theScanOpIdleList.release(aScanOperation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -567,8 +383,7 @@ void
|
|||||||
Ndb::releaseRecAttr(NdbRecAttr* aRecAttr)
|
Ndb::releaseRecAttr(NdbRecAttr* aRecAttr)
|
||||||
{
|
{
|
||||||
aRecAttr->release();
|
aRecAttr->release();
|
||||||
aRecAttr->next(theRecAttrIdleList);
|
theImpl->theRecAttrIdleList.release(aRecAttr);
|
||||||
theRecAttrIdleList = aRecAttr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -595,8 +410,7 @@ Ndb::releaseSignal(NdbApiSignal* aSignal)
|
|||||||
#ifdef POORMANSPURIFY
|
#ifdef POORMANSPURIFY
|
||||||
creleaseSignals++;
|
creleaseSignals++;
|
||||||
#endif
|
#endif
|
||||||
aSignal->next(theSignalIdleList);
|
theImpl->theSignalIdleList.release(aSignal);
|
||||||
theSignalIdleList = aSignal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -612,163 +426,7 @@ Ndb::releaseSignalsInList(NdbApiSignal** pList){
|
|||||||
void
|
void
|
||||||
Ndb::releaseNdbBlob(NdbBlob* aBlob)
|
Ndb::releaseNdbBlob(NdbBlob* aBlob)
|
||||||
{
|
{
|
||||||
aBlob->release();
|
theImpl->theNdbBlobIdleList.release(aBlob);
|
||||||
aBlob->theNext = theNdbBlobIdleList;
|
|
||||||
theNdbBlobIdleList = aBlob;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
void freeOperation();
|
|
||||||
|
|
||||||
Remark: Always release the first item in the free list
|
|
||||||
***************************************************************************/
|
|
||||||
void
|
|
||||||
Ndb::freeOperation()
|
|
||||||
{
|
|
||||||
NdbOperation* tOp = theOpIdleList;
|
|
||||||
theOpIdleList = theOpIdleList->next();
|
|
||||||
delete tOp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
void freeScanOperation();
|
|
||||||
|
|
||||||
Remark: Always release the first item in the free list
|
|
||||||
***************************************************************************/
|
|
||||||
void
|
|
||||||
Ndb::freeScanOperation()
|
|
||||||
{
|
|
||||||
NdbIndexScanOperation* tOp = theScanOpIdleList;
|
|
||||||
theScanOpIdleList = (NdbIndexScanOperation *)tOp->next();
|
|
||||||
delete tOp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
void freeIndexOperation();
|
|
||||||
|
|
||||||
Remark: Always release the first item in the free list
|
|
||||||
***************************************************************************/
|
|
||||||
void
|
|
||||||
Ndb::freeIndexOperation()
|
|
||||||
{
|
|
||||||
NdbIndexOperation* tOp = theIndexOpIdleList;
|
|
||||||
theIndexOpIdleList = (NdbIndexOperation *) theIndexOpIdleList->next();
|
|
||||||
delete tOp;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
void freeNdbBranch();
|
|
||||||
|
|
||||||
Remark: Always release the first item in the free list
|
|
||||||
***************************************************************************/
|
|
||||||
void
|
|
||||||
Ndb::freeNdbBranch()
|
|
||||||
{
|
|
||||||
NdbBranch* tNdbBranch = theBranchList;
|
|
||||||
theBranchList = theBranchList->theNext;
|
|
||||||
delete tNdbBranch;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
void freeNdbCall();
|
|
||||||
|
|
||||||
Remark: Always release the first item in the free list
|
|
||||||
***************************************************************************/
|
|
||||||
void
|
|
||||||
Ndb::freeNdbCall()
|
|
||||||
{
|
|
||||||
NdbCall* tNdbCall = theCallList;
|
|
||||||
theCallList = theCallList->theNext;
|
|
||||||
delete tNdbCall;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
void freeNdbScanRec();
|
|
||||||
|
|
||||||
Remark: Always release the first item in the free list
|
|
||||||
***************************************************************************/
|
|
||||||
void
|
|
||||||
Ndb::freeNdbScanRec()
|
|
||||||
{
|
|
||||||
NdbReceiver* tNdbScanRec = theScanList;
|
|
||||||
theScanList = theScanList->next();
|
|
||||||
delete tNdbScanRec;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
void freeNdbCon();
|
|
||||||
|
|
||||||
Remark: Always release the first item in the free list
|
|
||||||
***************************************************************************/
|
|
||||||
void
|
|
||||||
Ndb::freeNdbCon()
|
|
||||||
{
|
|
||||||
NdbConnection* tNdbCon = theConIdleList;
|
|
||||||
theConIdleList = theConIdleList->next();
|
|
||||||
delete tNdbCon;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
void freeNdbLabel();
|
|
||||||
|
|
||||||
Remark: Always release the first item in the free list
|
|
||||||
***************************************************************************/
|
|
||||||
void
|
|
||||||
Ndb::freeNdbLabel()
|
|
||||||
{
|
|
||||||
NdbLabel* tNdbLabel = theLabelList;
|
|
||||||
theLabelList = theLabelList->theNext;
|
|
||||||
delete tNdbLabel;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
void freeNdbSubroutine();
|
|
||||||
|
|
||||||
Remark: Always release the first item in the free list
|
|
||||||
***************************************************************************/
|
|
||||||
void
|
|
||||||
Ndb::freeNdbSubroutine()
|
|
||||||
{
|
|
||||||
NdbSubroutine* tNdbSubroutine = theSubroutineList;
|
|
||||||
theSubroutineList = theSubroutineList->theNext;
|
|
||||||
delete tNdbSubroutine;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
void freeRecAttr();
|
|
||||||
|
|
||||||
Remark: Always release the first item in the free list
|
|
||||||
***************************************************************************/
|
|
||||||
void
|
|
||||||
Ndb::freeRecAttr()
|
|
||||||
{
|
|
||||||
NdbRecAttr* tRecAttr = theRecAttrIdleList;
|
|
||||||
theRecAttrIdleList = theRecAttrIdleList->next();
|
|
||||||
delete tRecAttr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
void freeSignal();
|
|
||||||
|
|
||||||
Remark: Delete a signal object from the signal idlelist.
|
|
||||||
***************************************************************************/
|
|
||||||
void
|
|
||||||
Ndb::freeSignal()
|
|
||||||
{
|
|
||||||
NdbApiSignal* tSignal = theSignalIdleList;
|
|
||||||
theSignalIdleList = tSignal->next();
|
|
||||||
delete tSignal;
|
|
||||||
#ifdef POORMANSPURIFY
|
|
||||||
cfreeSignals++;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
Ndb::freeNdbBlob()
|
|
||||||
{
|
|
||||||
NdbBlob* tBlob = theNdbBlobIdleList;
|
|
||||||
theNdbBlobIdleList = tBlob->theNext;
|
|
||||||
delete tBlob;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -823,3 +481,102 @@ Ndb::releaseConnectToNdb(NdbConnection* a_con)
|
|||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
static
|
||||||
|
Ndb::Free_list_usage*
|
||||||
|
update(Ndb::Free_list_usage* curr,
|
||||||
|
Ndb_free_list_t<T> & list,
|
||||||
|
const char * name)
|
||||||
|
{
|
||||||
|
curr->m_name = name;
|
||||||
|
curr->m_created = list.m_alloc_cnt;
|
||||||
|
curr->m_free = list.m_free_cnt;
|
||||||
|
curr->m_sizeof = sizeof(T);
|
||||||
|
return curr;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ndb::Free_list_usage*
|
||||||
|
Ndb::get_free_list_usage(Ndb::Free_list_usage* curr)
|
||||||
|
{
|
||||||
|
if (curr == 0)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(curr->m_name == 0)
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theConIdleList, "NdbTransaction");
|
||||||
|
}
|
||||||
|
else if(!strcmp(curr->m_name, "NdbTransaction"))
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theOpIdleList, "NdbOperation");
|
||||||
|
}
|
||||||
|
else if(!strcmp(curr->m_name, "NdbOperation"))
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theScanOpIdleList, "NdbIndexScanOperation");
|
||||||
|
}
|
||||||
|
else if(!strcmp(curr->m_name, "NdbIndexScanOperation"))
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theIndexOpIdleList, "NdbIndexOperation");
|
||||||
|
}
|
||||||
|
else if(!strcmp(curr->m_name, "NdbIndexOperation"))
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theRecAttrIdleList, "NdbRecAttr");
|
||||||
|
}
|
||||||
|
else if(!strcmp(curr->m_name, "NdbRecAttr"))
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theSignalIdleList, "NdbApiSignal");
|
||||||
|
}
|
||||||
|
else if(!strcmp(curr->m_name, "NdbApiSignal"))
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theLabelList, "NdbLabel");
|
||||||
|
}
|
||||||
|
else if(!strcmp(curr->m_name, "NdbLabel"))
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theBranchList, "NdbBranch");
|
||||||
|
}
|
||||||
|
else if(!strcmp(curr->m_name, "NdbBranch"))
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theSubroutineList, "NdbSubroutine");
|
||||||
|
}
|
||||||
|
else if(!strcmp(curr->m_name, "NdbSubroutine"))
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theCallList, "NdbCall");
|
||||||
|
}
|
||||||
|
else if(!strcmp(curr->m_name, "NdbCall"))
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theNdbBlobIdleList, "NdbBlob");
|
||||||
|
}
|
||||||
|
else if(!strcmp(curr->m_name, "NdbBlob"))
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theScanList, "NdbReceiver");
|
||||||
|
}
|
||||||
|
else if(!strcmp(curr->m_name, "NdbReceiver"))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
update(curr, theImpl->theConIdleList, "NdbTransaction");
|
||||||
|
}
|
||||||
|
|
||||||
|
return curr;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TI(T) \
|
||||||
|
template Ndb::Free_list_usage* \
|
||||||
|
update(Ndb::Free_list_usage*, Ndb_free_list_t<T> &, const char * name);\
|
||||||
|
template struct Ndb_free_list_t<T>
|
||||||
|
|
||||||
|
TI(NdbBlob);
|
||||||
|
TI(NdbCall);
|
||||||
|
TI(NdbLabel);
|
||||||
|
TI(NdbBranch);
|
||||||
|
TI(NdbSubroutine);
|
||||||
|
TI(NdbApiSignal);
|
||||||
|
TI(NdbRecAttr);
|
||||||
|
TI(NdbOperation);
|
||||||
|
TI(NdbReceiver);
|
||||||
|
TI(NdbConnection);
|
||||||
|
TI(NdbIndexOperation);
|
||||||
|
TI(NdbIndexScanOperation);
|
||||||
|
@ -426,7 +426,7 @@ C##suitname():NDBT_TestSuite(#suitname){ \
|
|||||||
pt->addTable(tableName, false);
|
pt->addTable(tableName, false);
|
||||||
|
|
||||||
#define NDBT_TESTSUITE_END(suitname) \
|
#define NDBT_TESTSUITE_END(suitname) \
|
||||||
} } ; C##suitname suitname;
|
} } ; C##suitname suitname
|
||||||
|
|
||||||
// Helper functions for retrieving variables from NDBT_Step
|
// Helper functions for retrieving variables from NDBT_Step
|
||||||
#define GETNDB(ps) ((NDBT_NdbApiStep*)ps)->getNdb()
|
#define GETNDB(ps) ((NDBT_NdbApiStep*)ps)->getNdb()
|
||||||
|
@ -321,7 +321,7 @@ int Bank::loadGl(){
|
|||||||
|
|
||||||
m_ndb.closeTransaction(pTrans);
|
m_ndb.closeTransaction(pTrans);
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
int Bank::getBalanceForAccountType(const Uint32 accountType,
|
int Bank::getBalanceForAccountType(const Uint32 accountType,
|
||||||
@ -460,7 +460,7 @@ int Bank::loadAccountType(){
|
|||||||
|
|
||||||
m_ndb.closeTransaction(pTrans);
|
m_ndb.closeTransaction(pTrans);
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load ACCOUNT table
|
* Load ACCOUNT table
|
||||||
|
@ -2187,7 +2187,7 @@ pkinsert(Par par)
|
|||||||
}
|
}
|
||||||
con.closeTransaction();
|
con.closeTransaction();
|
||||||
return 0;
|
return 0;
|
||||||
};
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
pkupdate(Par par)
|
pkupdate(Par par)
|
||||||
@ -2250,7 +2250,7 @@ pkupdate(Par par)
|
|||||||
}
|
}
|
||||||
con.closeTransaction();
|
con.closeTransaction();
|
||||||
return 0;
|
return 0;
|
||||||
};
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
pkdelete(Par par)
|
pkdelete(Par par)
|
||||||
@ -2306,7 +2306,7 @@ pkdelete(Par par)
|
|||||||
}
|
}
|
||||||
con.closeTransaction();
|
con.closeTransaction();
|
||||||
return 0;
|
return 0;
|
||||||
};
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
pkread(Par par)
|
pkread(Par par)
|
||||||
|
@ -51,7 +51,7 @@ HugoCalculator::HugoCalculator(const NdbDictionary::Table& tab) : m_tab(tab) {
|
|||||||
#endif
|
#endif
|
||||||
// Check that idCol is not conflicting with updatesCol
|
// Check that idCol is not conflicting with updatesCol
|
||||||
assert(m_idCol != m_updatesCol && m_idCol != -1 && m_updatesCol != -1);
|
assert(m_idCol != m_updatesCol && m_idCol != -1 && m_updatesCol != -1);
|
||||||
};
|
}
|
||||||
|
|
||||||
Int32
|
Int32
|
||||||
HugoCalculator::calcValue(int record,
|
HugoCalculator::calcValue(int record,
|
||||||
@ -73,7 +73,7 @@ HugoCalculator::calcValue(int record,
|
|||||||
else
|
else
|
||||||
val = record + attrib + updates;
|
val = record + attrib + updates;
|
||||||
return val;
|
return val;
|
||||||
};
|
}
|
||||||
#if 0
|
#if 0
|
||||||
HugoCalculator::U_Int32 calcValue(int record, int attrib, int updates) const;
|
HugoCalculator::U_Int32 calcValue(int record, int attrib, int updates) const;
|
||||||
HugoCalculator::U_Int64 calcValue(int record, int attrib, int updates) const;
|
HugoCalculator::U_Int64 calcValue(int record, int attrib, int updates) const;
|
||||||
@ -123,7 +123,7 @@ HugoCalculator::calcValue(int record,
|
|||||||
buf[len] = 0;
|
buf[len] = 0;
|
||||||
}
|
}
|
||||||
return buf;
|
return buf;
|
||||||
};
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
HugoCalculator::verifyRowValues(NDBT_ResultRow* const pRow) const{
|
HugoCalculator::verifyRowValues(NDBT_ResultRow* const pRow) const{
|
||||||
|
@ -624,7 +624,7 @@ int NDBT_TestCase::execute(NDBT_Context* ctx){
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
void NDBT_TestCase::startTimer(NDBT_Context* ctx){
|
void NDBT_TestCase::startTimer(NDBT_Context* ctx){
|
||||||
|
@ -345,7 +345,7 @@ NdbBackup::NF(NdbRestarter& _restarter, int *NFDuringBackup_codes, const int sz,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
FailS_codes[] = {
|
FailS_codes[] = {
|
||||||
|
@ -213,7 +213,7 @@ NdbRestarts::NdbRestart::NdbRestart(const char* _name,
|
|||||||
m_restartFunc = _func;
|
m_restartFunc = _func;
|
||||||
m_numRequiredNodes = _requiredNodes;
|
m_numRequiredNodes = _requiredNodes;
|
||||||
// m_arg1 = arg1;
|
// m_arg1 = arg1;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
int NdbRestarts::getNumRestarts(){
|
int NdbRestarts::getNumRestarts(){
|
||||||
@ -367,7 +367,7 @@ int restartRandomNodeGraceful(NdbRestarter& _restarter,
|
|||||||
"Could not restart node "<<nodeId);
|
"Could not restart node "<<nodeId);
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int restartRandomNodeAbort(NdbRestarter& _restarter,
|
int restartRandomNodeAbort(NdbRestarter& _restarter,
|
||||||
const NdbRestarts::NdbRestart* _restart){
|
const NdbRestarts::NdbRestart* _restart){
|
||||||
@ -382,7 +382,7 @@ int restartRandomNodeAbort(NdbRestarter& _restarter,
|
|||||||
"Could not restart node "<<nodeId);
|
"Could not restart node "<<nodeId);
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int restartRandomNodeError(NdbRestarter& _restarter,
|
int restartRandomNodeError(NdbRestarter& _restarter,
|
||||||
const NdbRestarts::NdbRestart* _restart){
|
const NdbRestarts::NdbRestart* _restart){
|
||||||
@ -397,7 +397,7 @@ int restartRandomNodeError(NdbRestarter& _restarter,
|
|||||||
"Could not restart node "<<nodeId);
|
"Could not restart node "<<nodeId);
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int restartMasterNodeError(NdbRestarter& _restarter,
|
int restartMasterNodeError(NdbRestarter& _restarter,
|
||||||
const NdbRestarts::NdbRestart* _restart){
|
const NdbRestarts::NdbRestart* _restart){
|
||||||
@ -410,7 +410,7 @@ int restartMasterNodeError(NdbRestarter& _restarter,
|
|||||||
"Could not restart node "<<nodeId);
|
"Could not restart node "<<nodeId);
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int restartRandomNodeInitial(NdbRestarter& _restarter,
|
int restartRandomNodeInitial(NdbRestarter& _restarter,
|
||||||
const NdbRestarts::NdbRestart* _restart){
|
const NdbRestarts::NdbRestart* _restart){
|
||||||
@ -425,7 +425,7 @@ int restartRandomNodeInitial(NdbRestarter& _restarter,
|
|||||||
"Could not restart node "<<nodeId);
|
"Could not restart node "<<nodeId);
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int twoNodeFailure(NdbRestarter& _restarter,
|
int twoNodeFailure(NdbRestarter& _restarter,
|
||||||
const NdbRestarts::NdbRestart* _restart){
|
const NdbRestarts::NdbRestart* _restart){
|
||||||
@ -453,7 +453,7 @@ int twoNodeFailure(NdbRestarter& _restarter,
|
|||||||
"Could not restart node "<< nodeId);
|
"Could not restart node "<< nodeId);
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int twoMasterNodeFailure(NdbRestarter& _restarter,
|
int twoMasterNodeFailure(NdbRestarter& _restarter,
|
||||||
const NdbRestarts::NdbRestart* _restart){
|
const NdbRestarts::NdbRestart* _restart){
|
||||||
@ -478,7 +478,7 @@ int twoMasterNodeFailure(NdbRestarter& _restarter,
|
|||||||
"Could not restart node "<< nodeId);
|
"Could not restart node "<< nodeId);
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int get50PercentOfNodes(NdbRestarter& restarter,
|
int get50PercentOfNodes(NdbRestarter& restarter,
|
||||||
int * _nodes){
|
int * _nodes){
|
||||||
@ -519,7 +519,7 @@ int fiftyPercentFail(NdbRestarter& _restarter,
|
|||||||
"Could not start all nodes");
|
"Could not start all nodes");
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
int restartAllNodesGracfeul(NdbRestarter& _restarter,
|
int restartAllNodesGracfeul(NdbRestarter& _restarter,
|
||||||
@ -533,7 +533,7 @@ int restartAllNodesGracfeul(NdbRestarter& _restarter,
|
|||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
int restartAllNodesAbort(NdbRestarter& _restarter,
|
int restartAllNodesAbort(NdbRestarter& _restarter,
|
||||||
const NdbRestarts::NdbRestart* _restart){
|
const NdbRestarts::NdbRestart* _restart){
|
||||||
@ -545,7 +545,7 @@ int restartAllNodesAbort(NdbRestarter& _restarter,
|
|||||||
"Could not restart all nodes");
|
"Could not restart all nodes");
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int restartAllNodesError9999(NdbRestarter& _restarter,
|
int restartAllNodesError9999(NdbRestarter& _restarter,
|
||||||
const NdbRestarts::NdbRestart* _restart){
|
const NdbRestarts::NdbRestart* _restart){
|
||||||
@ -557,7 +557,7 @@ int restartAllNodesError9999(NdbRestarter& _restarter,
|
|||||||
"Could not restart all nodes ");
|
"Could not restart all nodes ");
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int fiftyPercentStopAndWait(NdbRestarter& _restarter,
|
int fiftyPercentStopAndWait(NdbRestarter& _restarter,
|
||||||
const NdbRestarts::NdbRestart* _restart){
|
const NdbRestarts::NdbRestart* _restart){
|
||||||
@ -590,7 +590,7 @@ int fiftyPercentStopAndWait(NdbRestarter& _restarter,
|
|||||||
g_info << _restart->m_name << endl;
|
g_info << _restart->m_name << endl;
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
NFDuringNR_codes[] = {
|
NFDuringNR_codes[] = {
|
||||||
@ -713,7 +713,7 @@ int restartNFDuringNR(NdbRestarter& _restarter,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
NRDuringLCP_Master_codes[] = {
|
NRDuringLCP_Master_codes[] = {
|
||||||
@ -864,7 +864,7 @@ int stopOnError(NdbRestarter& _restarter,
|
|||||||
} while (false);
|
} while (false);
|
||||||
|
|
||||||
return NDBT_OK;
|
return NDBT_OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
int getRandomNodeId(NdbRestarter& _restarter) {
|
int getRandomNodeId(NdbRestarter& _restarter) {
|
||||||
myRandom48Init(NdbTick_CurrentMillisecond());
|
myRandom48Init(NdbTick_CurrentMillisecond());
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user