summaryrefslogtreecommitdiff
path: root/ndb/src/ndbapi
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2004-10-28 14:49:40 +0000
committerunknown <tomas@poseidon.ndb.mysql.com>2004-10-28 14:49:40 +0000
commite3ac81bebf547b2031982134131ded3090cbe623 (patch)
tree3aee83590815225d7aa617e0d766fb0d4e3eb7af /ndb/src/ndbapi
parent51ad907d4894c486aa11089d695e918b2a1a04ef (diff)
downloadmariadb-git-e3ac81bebf547b2031982134131ded3090cbe623.tar.gz
scan should not send fragmented signal
use new sendSignal method instead new send signal method which sends segments remove unused method sendFragmentedSignalUnCond ndb/src/ndbapi/NdbScanOperation.cpp: scan should not send fragmented signal use new sendSignal method instead ndb/src/ndbapi/TransporterFacade.cpp: new send signal method which sends segments ndb/src/ndbapi/TransporterFacade.hpp: new send signal method which sends segments remove unused method sendFragmentedSignalUnCond
Diffstat (limited to 'ndb/src/ndbapi')
-rw-r--r--ndb/src/ndbapi/NdbScanOperation.cpp4
-rw-r--r--ndb/src/ndbapi/TransporterFacade.cpp32
-rw-r--r--ndb/src/ndbapi/TransporterFacade.hpp7
3 files changed, 36 insertions, 7 deletions
diff --git a/ndb/src/ndbapi/NdbScanOperation.cpp b/ndb/src/ndbapi/NdbScanOperation.cpp
index fd63ce96f25..86bac7deb16 100644
--- a/ndb/src/ndbapi/NdbScanOperation.cpp
+++ b/ndb/src/ndbapi/NdbScanOperation.cpp
@@ -612,7 +612,7 @@ NdbScanOperation::send_next_scan(Uint32 cnt, bool stopScanFlag){
LinearSectionPtr ptr[3];
ptr[0].p = prep_array;
ptr[0].sz = cnt;
- ret = tp->sendFragmentedSignal(&tSignal, nodeId, ptr, 1);
+ ret = tp->sendSignal(&tSignal, nodeId, ptr, 1);
} else {
tSignal.setLength(4+cnt);
ret = tp->sendSignal(&tSignal, nodeId);
@@ -803,7 +803,7 @@ NdbScanOperation::doSendScan(int aProcessorId)
LinearSectionPtr ptr[3];
ptr[0].p = m_prepared_receivers;
ptr[0].sz = theParallelism;
- if (tp->sendFragmentedSignal(tSignal, aProcessorId, ptr, 1) == -1) {
+ if (tp->sendSignal(tSignal, aProcessorId, ptr, 1) == -1) {
setErrorCode(4002);
return -1;
}
diff --git a/ndb/src/ndbapi/TransporterFacade.cpp b/ndb/src/ndbapi/TransporterFacade.cpp
index 2bf2b39f9a6..dfb090c8416 100644
--- a/ndb/src/ndbapi/TransporterFacade.cpp
+++ b/ndb/src/ndbapi/TransporterFacade.cpp
@@ -955,6 +955,38 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
return ret;
}
+int
+TransporterFacade::sendSignal(NdbApiSignal* aSignal, NodeId aNode,
+ LinearSectionPtr ptr[3], Uint32 secs){
+ aSignal->m_noOfSections = secs;
+ if(getIsNodeSendable(aNode) == true){
+#ifdef API_TRACE
+ if(setSignalLog() && TRACE_GSN(aSignal->theVerId_signalNumber)){
+ Uint32 tmp = aSignal->theSendersBlockRef;
+ aSignal->theSendersBlockRef = numberToRef(tmp, theOwnId);
+ signalLogger.sendSignal(* aSignal,
+ 1,
+ aSignal->getDataPtrSend(),
+ aNode,
+ ptr, secs);
+ signalLogger.flushSignalLog();
+ aSignal->theSendersBlockRef = tmp;
+ }
+#endif
+ SendStatus ss = theTransporterRegistry->prepareSend
+ (aSignal,
+ 1, // JBB
+ aSignal->getDataPtrSend(),
+ aNode,
+ ptr);
+ assert(ss != SEND_MESSAGE_TOO_BIG);
+ aSignal->m_noOfSections = 0;
+ return (ss == SEND_OK ? 0 : -1);
+ }
+ aSignal->m_noOfSections = 0;
+ return -1;
+}
+
/******************************************************************************
* CONNECTION METHODS Etc
******************************************************************************/
diff --git a/ndb/src/ndbapi/TransporterFacade.hpp b/ndb/src/ndbapi/TransporterFacade.hpp
index b288e2ee8e6..5680e3a6f03 100644
--- a/ndb/src/ndbapi/TransporterFacade.hpp
+++ b/ndb/src/ndbapi/TransporterFacade.hpp
@@ -69,14 +69,11 @@ public:
// Only sends to nodes which are alive
int sendSignal(NdbApiSignal * signal, NodeId nodeId);
+ int sendSignal(NdbApiSignal*, NodeId,
+ LinearSectionPtr ptr[3], Uint32 secs);
int sendFragmentedSignal(NdbApiSignal*, NodeId,
LinearSectionPtr ptr[3], Uint32 secs);
- //Dirrrrty
- int sendFragmentedSignalUnCond(NdbApiSignal*, NodeId,
- LinearSectionPtr ptr[3], Uint32 secs);
-
-
// Is node available for running transactions
bool get_node_alive(NodeId nodeId) const;
bool get_node_stopping(NodeId nodeId) const;