summaryrefslogtreecommitdiff
path: root/ndb/src/ndbapi/NdbScanOperation.cpp
diff options
context:
space:
mode:
authorunknown <gkodinov@dl145s.mysql.com>2006-09-15 11:43:28 +0200
committerunknown <gkodinov@dl145s.mysql.com>2006-09-15 11:43:28 +0200
commit252367713cf14ac86dd174bf8a5648a610d3b8b5 (patch)
tree3393129d89882077b8e7911bf50e650435833433 /ndb/src/ndbapi/NdbScanOperation.cpp
parent6207a6aaef44701b2d891fab323c98d509c9fd61 (diff)
parent74d1b46263bcec63cc2c3801e2e441817e994ca9 (diff)
downloadmariadb-git-252367713cf14ac86dd174bf8a5648a610d3b8b5.tar.gz
Merge dl145s.mysql.com:/data/bk/team_tree_merge/CLEAN/mysql-4.1
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
Diffstat (limited to 'ndb/src/ndbapi/NdbScanOperation.cpp')
-rw-r--r--ndb/src/ndbapi/NdbScanOperation.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/ndb/src/ndbapi/NdbScanOperation.cpp b/ndb/src/ndbapi/NdbScanOperation.cpp
index 0a39651ce28..469231512f5 100644
--- a/ndb/src/ndbapi/NdbScanOperation.cpp
+++ b/ndb/src/ndbapi/NdbScanOperation.cpp
@@ -504,6 +504,8 @@ int NdbScanOperation::nextResult(bool fetchAllowed, bool forceSend)
idx = m_current_api_receiver;
last = m_api_receivers_count;
+
+ Uint32 timeout = tp->m_waitfor_timeout;
do {
if(theError.code){
@@ -531,7 +533,7 @@ int NdbScanOperation::nextResult(bool fetchAllowed, bool forceSend)
*/
theNdb->theImpl->theWaiter.m_node = nodeId;
theNdb->theImpl->theWaiter.m_state = WAIT_SCAN;
- int return_code = theNdb->receiveResponse(WAITFOR_SCAN_TIMEOUT);
+ int return_code = theNdb->receiveResponse(3*timeout);
if (return_code == 0 && seq == tp->getNodeSequence(nodeId)) {
continue;
} else {
@@ -1372,6 +1374,7 @@ NdbIndexScanOperation::next_result_ordered(bool fetchAllowed,
return -1;
Uint32 seq = theNdbCon->theNodeSequence;
Uint32 nodeId = theNdbCon->theDBnode;
+ Uint32 timeout = tp->m_waitfor_timeout;
if(seq == tp->getNodeSequence(nodeId) &&
!send_next_scan_ordered(s_idx, forceSend)){
Uint32 tmp = m_sent_receivers_count;
@@ -1379,7 +1382,7 @@ NdbIndexScanOperation::next_result_ordered(bool fetchAllowed,
while(m_sent_receivers_count > 0 && !theError.code){
theNdb->theImpl->theWaiter.m_node = nodeId;
theNdb->theImpl->theWaiter.m_state = WAIT_SCAN;
- int return_code = theNdb->receiveResponse(WAITFOR_SCAN_TIMEOUT);
+ int return_code = theNdb->receiveResponse(3*timeout);
if (return_code == 0 && seq == tp->getNodeSequence(nodeId)) {
continue;
}
@@ -1520,6 +1523,8 @@ NdbScanOperation::close_impl(TransporterFacade* tp, bool forceSend){
return -1;
}
+ Uint32 timeout = tp->m_waitfor_timeout;
+
/**
* Wait for outstanding
*/
@@ -1527,7 +1532,7 @@ NdbScanOperation::close_impl(TransporterFacade* tp, bool forceSend){
{
theNdb->theImpl->theWaiter.m_node = nodeId;
theNdb->theImpl->theWaiter.m_state = WAIT_SCAN;
- int return_code = theNdb->receiveResponse(WAITFOR_SCAN_TIMEOUT);
+ int return_code = theNdb->receiveResponse(3*timeout);
switch(return_code){
case 0:
break;
@@ -1597,7 +1602,7 @@ NdbScanOperation::close_impl(TransporterFacade* tp, bool forceSend){
{
theNdb->theImpl->theWaiter.m_node = nodeId;
theNdb->theImpl->theWaiter.m_state = WAIT_SCAN;
- int return_code = theNdb->receiveResponse(WAITFOR_SCAN_TIMEOUT);
+ int return_code = theNdb->receiveResponse(3*timeout);
switch(return_code){
case 0:
break;