summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authortomas@mc05.(none) <>2004-05-19 14:39:26 +0200
committertomas@mc05.(none) <>2004-05-19 14:39:26 +0200
commitb236391513240310fd28c15f3f07c18b92c9cd6f (patch)
tree546af590cdc037fec8a07fe04a3c2e4097250463 /ndb
parent794f2fd898c52f96f64ae661a51b8b170485ba99 (diff)
parentcf194d4b932c9b04069f7b51dc116d5aa6349415 (diff)
downloadmariadb-git-b236391513240310fd28c15f3f07c18b92c9cd6f.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mc05.(none):/space/tomas/mysql-4.1-ndb
Diffstat (limited to 'ndb')
-rwxr-xr-xndb/config/GuessConfig.sh1
-rw-r--r--ndb/include/kernel/signaldata/CreateEvnt.hpp2
-rw-r--r--ndb/include/kernel/trigger_definitions.h1
-rw-r--r--ndb/include/util/Bitmask.hpp15
-rw-r--r--ndb/src/common/util/md5_hash.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.cpp14
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.hpp32
-rw-r--r--ndb/src/kernel/blocks/dbtux/Dbtux.hpp34
-rw-r--r--ndb/src/kernel/blocks/trix/Trix.hpp17
-rw-r--r--ndb/src/ndbapi/DictCache.hpp3
-rw-r--r--ndb/src/ndbapi/NdbDictionary.cpp2
-rw-r--r--ndb/src/ndbapi/NdbDictionaryImpl.cpp4
-rw-r--r--ndb/src/rep/SignalQueue.hpp2
-rw-r--r--ndb/src/rep/adapters/ExtNDB.cpp9
-rw-r--r--ndb/src/rep/adapters/ExtNDB.hpp10
-rw-r--r--ndb/src/rep/transfer/TransPS.cpp5
-rw-r--r--ndb/src/rep/transfer/TransPS.hpp8
-rw-r--r--ndb/src/rep/transfer/TransSS.cpp5
-rw-r--r--ndb/src/rep/transfer/TransSS.hpp6
19 files changed, 120 insertions, 52 deletions
diff --git a/ndb/config/GuessConfig.sh b/ndb/config/GuessConfig.sh
index 3caeeaae6d0..8c7886401ba 100755
--- a/ndb/config/GuessConfig.sh
+++ b/ndb/config/GuessConfig.sh
@@ -105,6 +105,7 @@ parse_arguments "$@"
echo "NDB_COMPILER := $NDB_COMPILER"
echo "NDB_VERSION := $NDB_VERSION"
echo "NDB_SCI := $NDB_SCI"
+ echo "NDB_SHM := $NDB_SHM"
echo "NDB_ODBC := $NDB_ODBC"
echo "TERMCAP_LIB := $TERMCAP_LIB"
echo "PACKAGE := $PACKAGE"
diff --git a/ndb/include/kernel/signaldata/CreateEvnt.hpp b/ndb/include/kernel/signaldata/CreateEvnt.hpp
index 7398fb6d8cc..65a07c122a2 100644
--- a/ndb/include/kernel/signaldata/CreateEvnt.hpp
+++ b/ndb/include/kernel/signaldata/CreateEvnt.hpp
@@ -250,7 +250,7 @@ struct CreateEvntReq {
return tmp;
}
void setAttrListBitmask(const AttributeMask & val) {
- m_attrListBitmask = val;
+ AttributeMask::assign(m_attrListBitmask.data, val);
}
Uint32 getEventType() const {
return m_eventType;
diff --git a/ndb/include/kernel/trigger_definitions.h b/ndb/include/kernel/trigger_definitions.h
index a5e7fb1953c..439d65c6c30 100644
--- a/ndb/include/kernel/trigger_definitions.h
+++ b/ndb/include/kernel/trigger_definitions.h
@@ -17,6 +17,7 @@
#ifndef NDB_TRIGGER_DEFINITIONS_H
#define NDB_TRIGGER_DEFINITIONS_H
+#include <ndb_global.h>
#include "ndb_limits.h"
#ifndef MIN
diff --git a/ndb/include/util/Bitmask.hpp b/ndb/include/util/Bitmask.hpp
index ed981743512..00255d3a86b 100644
--- a/ndb/include/util/Bitmask.hpp
+++ b/ndb/include/util/Bitmask.hpp
@@ -331,11 +331,12 @@ public:
*/
struct Data {
Uint32 data[size];
-
+#if 0
Data & operator=(const Bitmask<size> & src) {
src.assign(size, data);
return *this;
}
+#endif
};
private:
@@ -348,12 +349,13 @@ public:
/**
* assign - Set all bits in <em>dst</em> to corresponding in <em>src/<em>
*/
- void assign(const Bitmask<size>::Data & src);
+ void assign(const typename Bitmask<size>::Data & src);
/**
* assign - Set all bits in <em>dst</em> to corresponding in <em>src/<em>
*/
static void assign(Uint32 dst[], const Uint32 src[]);
+ static void assign(Uint32 dst[], const Bitmask<size> & src);
void assign(const Bitmask<size> & src);
/**
@@ -480,7 +482,14 @@ Bitmask<size>::assign(Uint32 dst[], const Uint32 src[])
template <unsigned size>
inline void
-Bitmask<size>::assign(const Bitmask<size>::Data & src)
+Bitmask<size>::assign(Uint32 dst[], const Bitmask<size> & src)
+{
+ BitmaskImpl::assign(size, dst, src.rep.data);
+}
+
+template <unsigned size>
+inline void
+Bitmask<size>::assign(const typename Bitmask<size>::Data & src)
{
assign(rep.data, src.data);
}
diff --git a/ndb/src/common/util/md5_hash.cpp b/ndb/src/common/util/md5_hash.cpp
index 5e28edcf8fa..068843183ac 100644
--- a/ndb/src/common/util/md5_hash.cpp
+++ b/ndb/src/common/util/md5_hash.cpp
@@ -48,7 +48,7 @@ void byteReverse(unsigned char *buf, unsigned longs);
*/
void byteReverse(unsigned char *buf, unsigned longs)
{
- uint32 t;
+ Uint32 t;
do {
t = (Uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
((unsigned) buf[1] << 8 | buf[0]);
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index 78616dd7234..8cf15b6bef2 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -7762,8 +7762,9 @@ Dbdict::createEventComplete_RT_USER_GET(Signal* signal,
#endif
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
- evntRecPtr.p->m_reqTracker.init<CreateEvntRef>
- (c_counterMgr, rg, GSN_CREATE_EVNT_REF, evntRecPtr.i);
+ RequestTracker & p = evntRecPtr.p->m_reqTracker;
+ p.init<CreateEvntRef>(c_counterMgr, rg, GSN_CREATE_EVNT_REF, evntRecPtr.i);
+
sendSignal(rg, GSN_CREATE_EVNT_REQ, signal, CreateEvntReq::SignalLength, JBB);
}
@@ -8111,7 +8112,8 @@ void Dbdict::execSUB_START_REQ(Signal* signal)
subbPtr.p->m_senderRef = origSenderRef; // not sure if API sets correctly
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
- subbPtr.p->m_reqTracker.init<SubStartRef>(c_counterMgr, rg, GSN_SUB_START_REF, subbPtr.i);
+ RequestTracker & p = subbPtr.p->m_reqTracker;
+ p.init<SubStartRef>(c_counterMgr, rg, GSN_SUB_START_REF, subbPtr.i);
SubStartReq* req = (SubStartReq*) signal->getDataPtrSend();
@@ -8324,7 +8326,8 @@ void Dbdict::execSUB_STOP_REQ(Signal* signal)
#endif
subbPtr.p->m_senderRef = origSenderRef; // not sure if API sets correctly
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
- subbPtr.p->m_reqTracker.init<SubStopRef>(c_counterMgr, rg, GSN_SUB_STOP_REF, subbPtr.i);
+ RequestTracker & p = subbPtr.p->m_reqTracker;
+ p.init<SubStopRef>(c_counterMgr, rg, GSN_SUB_STOP_REF, subbPtr.i);
SubStopReq* req = (SubStopReq*) signal->getDataPtrSend();
@@ -8611,7 +8614,8 @@ Dbdict::dropEventUTIL_EXECUTE_READ(Signal* signal,
parseReadEventSys(signal, evntRecPtr.p->m_eventRec);
NodeReceiverGroup rg(DBDICT, c_aliveNodes);
- evntRecPtr.p->m_reqTracker.init<SubRemoveRef>(c_counterMgr, rg, GSN_SUB_REMOVE_REF,
+ RequestTracker & p = evntRecPtr.p->m_reqTracker;
+ p.init<SubRemoveRef>(c_counterMgr, rg, GSN_SUB_REMOVE_REF,
evntRecPtr.i);
SubRemoveReq* req = (SubRemoveReq*) signal->getDataPtrSend();
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
index 02e2d4496bf..44086b19efd 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
@@ -102,6 +102,22 @@
#endif
/**
+ * Systable NDB$EVENTS_0
+ */
+
+#define EVENT_SYSTEM_TABLE_NAME "sys/def/NDB$EVENTS_0"
+#define EVENT_SYSTEM_TABLE_LENGTH 6
+
+struct sysTab_NDBEVENTS_0 {
+ char NAME[MAX_TAB_NAME_SIZE];
+ Uint32 EVENT_TYPE;
+ char TABLE_NAME[MAX_TAB_NAME_SIZE];
+ Uint32 ATTRIBUTE_MASK[MAXNROFATTRIBUTESINWORDS];
+ Uint32 SUBID;
+ Uint32 SUBKEY;
+};
+
+/**
* DICT - This blocks handles all metadata
*/
class Dbdict: public SimulatedBlock {
@@ -1227,22 +1243,6 @@ private:
};
typedef Ptr<OpSubEvent> OpSubEventPtr;
- /**
- * Systable NDB$EVENTS_0
- */
-
-#define EVENT_SYSTEM_TABLE_NAME "sys/def/NDB$EVENTS_0"
-#define EVENT_SYSTEM_TABLE_LENGTH 6
-
- struct sysTab_NDBEVENTS_0 {
- char NAME[MAX_TAB_NAME_SIZE];
- Uint32 EVENT_TYPE;
- char TABLE_NAME[MAX_TAB_NAME_SIZE];
- Uint32 ATTRIBUTE_MASK[MAXNROFATTRIBUTESINWORDS];
- Uint32 SUBID;
- Uint32 SUBKEY;
- };
-
static const Uint32 sysTab_NDBEVENTS_0_szs[];
/**
diff --git a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
index 4737c8422c4..b73af5b0d76 100644
--- a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
+++ b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
@@ -103,7 +103,9 @@ private:
static const unsigned MaxNodeHandles = 128; // enough for 1 operation
#endif
static const unsigned MaxAttrDataSize = 2048;
+public:
static const unsigned DescPageSize = 256;
+private:
static const unsigned MaxTreeNodeSize = MAX_TTREE_NODE_SIZE;
static const unsigned ScanBoundSegmentSize = 7;
static const unsigned MaxAccLockOps = MAX_PARALLEL_OP_PER_SCAN;
@@ -126,10 +128,13 @@ private:
Data& operator+=(size_t n);
AttributeHeader& ah() const;
};
+ friend class Data;
/*
* Pointer to constant Uint32 data.
*/
+ struct ConstData;
+ friend struct ConstData;
struct ConstData {
private:
const Uint32* m_data;
@@ -173,6 +178,8 @@ private:
* of "original" tuple and tuple version. Uses 2 words to get correct
* aligment (one byte is wasted currently).
*/
+ struct TreeEnt;
+ friend struct TreeEnt;
struct TreeEnt {
TupAddr m_tupAddr; // address of original tuple
Uint16 m_tupVersion; // version
@@ -202,6 +209,8 @@ private:
* a node is about to be removed. If occupancy is 1, only max entry
* is present but both min and max prefixes are set.
*/
+ struct TreeNode;
+ friend struct TreeNode;
struct TreeNode {
TupAddr m_link[3]; // link to 0-left child 1-right child 2-parent
Uint8 m_side; // we are 0-left child 1-right child 2-root
@@ -228,6 +237,8 @@ private:
* Tree header. There is one in each fragment. Contains tree
* parameters and address of root node.
*/
+ struct TreeHead;
+ friend struct TreeHead;
struct TreeHead {
Uint8 m_nodeSize; // words in tree node
Uint8 m_prefSize; // words in min/max prefix each
@@ -248,6 +259,8 @@ private:
* also represented by position 0 of next node. Includes direction
* and copy of entry used by scan.
*/
+ struct TreePos;
+ friend struct TreePos;
struct TreePos {
TupAddr m_addr; // logical node address
TupLoc m_loc; // physical address
@@ -264,6 +277,8 @@ private:
* Descriptor page. The "hot" metadata for an index is stored as
* a contiguous array of words on some page.
*/
+ struct DescPage;
+ friend struct DescPage;
struct DescPage {
Uint32 m_nextPage;
Uint32 m_numFree; // number of free words
@@ -301,6 +316,8 @@ private:
* Complete metadata for one index. The array of attributes has
* variable size.
*/
+ struct DescEnt;
+ friend struct DescEnt;
struct DescEnt {
DescHead m_descHead;
DescAttr m_descAttr[1]; // variable size data
@@ -329,6 +346,8 @@ private:
* be for an entry we were moved away from. In any case nothing
* happens with current entry before lock wait flag is cleared.
*/
+ struct ScanOp;
+ friend struct ScanOp;
struct ScanOp {
enum {
Undef = 0,
@@ -382,6 +401,8 @@ private:
* Ordered index. Top level data structure. The primary table (table
* being indexed) lives in TUP.
*/
+ struct Index;
+ friend struct Index;
struct Index {
enum State {
NotDefined = 0,
@@ -412,6 +433,8 @@ private:
* duplicate fragments known to LQH/ACC/TUP. Includes tree header.
* There are no maintenance operation records yet.
*/
+ struct Frag;
+ friend struct Frag;
struct Frag {
Uint32 m_tableId; // copy from index level
Uint32 m_indexId;
@@ -458,6 +481,8 @@ private:
* different implementations of index memory access. The cache is
* committed and released at the end of the operation.
*/
+ struct NodeHandle;
+ friend struct NodeHandle;
struct NodeHandle {
enum Flags {
// bits 0,1 mark need for left,right prefix
@@ -508,7 +533,6 @@ private:
};
typedef Ptr<NodeHandle> NodeHandlePtr;
ArrayPool<NodeHandle> c_nodeHandlePool;
- friend class NodeHandle;
// parameters for methods
@@ -528,6 +552,8 @@ private:
/*
* Read index key attributes.
*/
+ struct ReadPar;
+ friend struct ReadPar;
struct ReadPar {
TreeEnt m_ent; // tuple to read
unsigned m_first; // first index attribute
@@ -551,6 +577,8 @@ private:
/*
* Tree search for entry.
*/
+ struct SearchPar;
+ friend struct SearchPar;
struct SearchPar {
ConstData m_data; // input index key values
TreeEnt m_ent; // input tuple and version
@@ -560,6 +588,8 @@ private:
/*
* Attribute data comparison.
*/
+ struct CmpPar;
+ friend struct CmpPar;
struct CmpPar {
ConstData m_data1; // full search key
ConstData m_data2; // full or prefix data
@@ -572,6 +602,8 @@ private:
/*
* Scan bound comparison.
*/
+ struct BoundPar;
+ friend struct BoundPar;
struct BoundPar {
ConstData m_data1; // full bound data
ConstData m_data2; // full or prefix data
diff --git a/ndb/src/kernel/blocks/trix/Trix.hpp b/ndb/src/kernel/blocks/trix/Trix.hpp
index 05563559b77..f096e135094 100644
--- a/ndb/src/kernel/blocks/trix/Trix.hpp
+++ b/ndb/src/kernel/blocks/trix/Trix.hpp
@@ -39,6 +39,15 @@ public:
Trix(const class Configuration & conf);
virtual ~Trix();
+public:
+ // Subscription data, when communicating with SUMA
+
+ enum RequestType {
+ TABLE_REORG = 0,
+ INDEX_BUILD = 1
+ };
+ typedef DataBuffer<11> AttrOrderBuffer;
+
private:
// Private attributes
@@ -87,14 +96,6 @@ private:
Uint16 c_noNodesFailed;
Uint16 c_noActiveNodes;
- // Subscription data, when communicating with SUMA
- enum RequestType {
- TABLE_REORG = 0,
- INDEX_BUILD = 1
- };
-
- typedef DataBuffer<11> AttrOrderBuffer;
-
AttrOrderBuffer::DataBufferPool c_theAttrOrderBufferPool;
struct SubscriptionRecord {
diff --git a/ndb/src/ndbapi/DictCache.hpp b/ndb/src/ndbapi/DictCache.hpp
index e59793bbc09..098acc9006a 100644
--- a/ndb/src/ndbapi/DictCache.hpp
+++ b/ndb/src/ndbapi/DictCache.hpp
@@ -56,13 +56,14 @@ public:
NdbTableImpl* put(const char * name, NdbTableImpl *);
void drop(NdbTableImpl *);
void release(NdbTableImpl *);
-private:
+public:
enum Status {
OK = 0,
DROPPED = 1,
RETREIVING = 2
};
+private:
struct TableVersion {
Uint32 m_version;
Uint32 m_refCount;
diff --git a/ndb/src/ndbapi/NdbDictionary.cpp b/ndb/src/ndbapi/NdbDictionary.cpp
index b068ea6460f..89ed801bec5 100644
--- a/ndb/src/ndbapi/NdbDictionary.cpp
+++ b/ndb/src/ndbapi/NdbDictionary.cpp
@@ -234,7 +234,7 @@ NdbDictionary::Table::~Table(){
}
NdbDictionary::Table&
-NdbDictionary::Table::operator=(const NdbDictionary::Table::Table& table)
+NdbDictionary::Table::operator=(const NdbDictionary::Table& table)
{
m_impl.assign(table.m_impl);
diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
index 02e3ee23f9c..89c4fb19399 100644
--- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
@@ -56,8 +56,8 @@ NdbColumnImpl::NdbColumnImpl(NdbDictionary::Column & f)
init();
}
-NdbColumnImpl::NdbColumnImpl&
-NdbColumnImpl::operator=(const NdbColumnImpl::NdbColumnImpl& col)
+NdbColumnImpl&
+NdbColumnImpl::operator=(const NdbColumnImpl& col)
{
m_attrId = col.m_attrId;
m_name = col.m_name;
diff --git a/ndb/src/rep/SignalQueue.hpp b/ndb/src/rep/SignalQueue.hpp
index 5ebc78a3a37..697bca85893 100644
--- a/ndb/src/rep/SignalQueue.hpp
+++ b/ndb/src/rep/SignalQueue.hpp
@@ -53,7 +53,7 @@ public:
template<class T> bool waitFor(Vector<T> &t,
T *&handler,
NdbApiSignal *&signal,
- Uint32 timeout = DEFAULT_TIMEOUT);
+ Uint32 timeout);
/**
* size()
diff --git a/ndb/src/rep/adapters/ExtNDB.cpp b/ndb/src/rep/adapters/ExtNDB.cpp
index eb541cdced9..036406828be 100644
--- a/ndb/src/rep/adapters/ExtNDB.cpp
+++ b/ndb/src/rep/adapters/ExtNDB.cpp
@@ -186,8 +186,8 @@ public:
};
};
-void *
-ExtNDB::signalExecThread_C(void *r)
+extern "C"
+void *signalExecThread_C(void *r)
{
ExtNDB *grepps = (ExtNDB*)r;
@@ -198,6 +198,7 @@ ExtNDB::signalExecThread_C(void *r)
return 0;
}
+
void
ExtNDB::signalExecThreadRun()
{
@@ -233,10 +234,12 @@ ExtNDB::signalExecThreadRun()
sl.push_back(SigMatch(GSN_GREP_SUB_START_REF, &ExtNDB::sendSignalRep));
sl.push_back(SigMatch(GSN_GREP_SUB_CREATE_REF, &ExtNDB::sendSignalRep));
+
while(1) {
SigMatch *handler = NULL;
NdbApiSignal *signal = NULL;
- if(m_signalRecvQueue.waitFor(sl, handler, signal)) {
+
+ if(m_signalRecvQueue.waitFor(sl, handler, signal, DEFAULT_TIMEOUT)) {
#if 0
RLOG(("Removed signal from queue (GSN: %d, QSize: %d)",
signal->readSignalNumber(), m_signalRecvQueue.size()));
diff --git a/ndb/src/rep/adapters/ExtNDB.hpp b/ndb/src/rep/adapters/ExtNDB.hpp
index bcbf51393aa..228c980fd06 100644
--- a/ndb/src/rep/adapters/ExtNDB.hpp
+++ b/ndb/src/rep/adapters/ExtNDB.hpp
@@ -34,6 +34,10 @@
#include <rep/storage/GCIContainerPS.hpp>
#include "ExtAPI.hpp"
+extern "C" {
+static void * signalExecThread_C(void *);
+}
+
/**
* @class ExtNDB
* @brief Class responsible for connection to primary system GREP
@@ -58,15 +62,15 @@ public:
void signalErrorHandler(NdbApiSignal * s, Uint32 nodeId);
private:
+ friend void * signalExecThread_C(void *);
+ void signalExecThreadRun();
+
static void execSignal(void* signalSender, NdbApiSignal* signal,
class LinearSectionPtr ptr[3]);
static void execNodeStatus(void* signalSender, NodeId,
bool alive, bool nfCompleted);
- void signalExecThreadRun();
- static void * signalExecThread_C(void *);
-
void sendSignalRep(NdbApiSignal *);
void sendDisconnectRep(Uint32 nodeId);
diff --git a/ndb/src/rep/transfer/TransPS.cpp b/ndb/src/rep/transfer/TransPS.cpp
index 1f65e95850d..d43555a0ce5 100644
--- a/ndb/src/rep/transfer/TransPS.cpp
+++ b/ndb/src/rep/transfer/TransPS.cpp
@@ -153,8 +153,9 @@ public:
};
};
+extern "C"
void *
-TransPS::signalExecThread_C(void *r)
+signalExecThread_C(void *r)
{
TransPS *repps = (TransPS*)r;
@@ -196,7 +197,7 @@ TransPS::signalExecThreadRun()
while(1) {
SigMatch *handler = NULL;
NdbApiSignal *signal = NULL;
- if(m_signalRecvQueue.waitFor(sl, handler, signal)) {
+ if(m_signalRecvQueue.waitFor(sl, handler, signal, DEFAULT_TIMEOUT)) {
#if 0
ndbout_c("TransPS: Removed signal from queue (GSN: %d, QSize: %d)",
signal->readSignalNumber(), m_signalRecvQueue.size());
diff --git a/ndb/src/rep/transfer/TransPS.hpp b/ndb/src/rep/transfer/TransPS.hpp
index b47f1acfca2..0464b9e47c0 100644
--- a/ndb/src/rep/transfer/TransPS.hpp
+++ b/ndb/src/rep/transfer/TransPS.hpp
@@ -35,6 +35,10 @@
#include <rep/rep_version.hpp>
+extern "C" {
+static void * signalExecThread_C(void *);
+}
+
/**
* @class TransPS
* @brief Responsible for REP-REP interface in Primary System role
@@ -62,8 +66,10 @@ private:
/**
* SignalQueue executor thread
*/
+
+ friend void * signalExecThread_C(void *);
+
void signalExecThreadRun();
- static void * signalExecThread_C(void *);
static void execSignal(void* signalSender, NdbApiSignal* signal,
class LinearSectionPtr ptr[3]);
diff --git a/ndb/src/rep/transfer/TransSS.cpp b/ndb/src/rep/transfer/TransSS.cpp
index 83f4b570330..719271df238 100644
--- a/ndb/src/rep/transfer/TransSS.cpp
+++ b/ndb/src/rep/transfer/TransSS.cpp
@@ -165,8 +165,9 @@ public:
};
};
+extern "C"
void *
-TransSS::signalExecThread_C(void *r)
+signalExecThread_C(void *r)
{
TransSS *transss = (TransSS*)r;
@@ -243,7 +244,7 @@ TransSS::signalExecThreadRun()
while(1) {
SigMatch *handler = NULL;
NdbApiSignal *signal = NULL;
- if(m_signalRecvQueue.waitFor(sl, handler, signal))
+ if(m_signalRecvQueue.waitFor(sl, handler, signal, DEFAULT_TIMEOUT))
{
#if 0
ndbout_c("TransSS: Removed signal from queue (GSN: %d, QSize: %d)",
diff --git a/ndb/src/rep/transfer/TransSS.hpp b/ndb/src/rep/transfer/TransSS.hpp
index 6f2089e46ac..3340038c8d1 100644
--- a/ndb/src/rep/transfer/TransSS.hpp
+++ b/ndb/src/rep/transfer/TransSS.hpp
@@ -34,6 +34,10 @@
#include <rep/state/RepState.hpp>
+extern "C" {
+static void * signalExecThread_C(void *);
+}
+
/**
* @class TransSS
* @brief Responsible for REP-REP interface in Standby System role
@@ -57,8 +61,8 @@ private:
/***************************************************************************
* Private Methods
***************************************************************************/
+ friend void * signalExecThread_C(void *);
void signalExecThreadRun(); ///< SignalQueue executor thread
- static void * signalExecThread_C(void *);
static void execSignal(void* executorObj, NdbApiSignal* signal,
class LinearSectionPtr ptr[3]);