diff options
author | unknown <jonas@mc01.ndb.mysql.com> | 2006-06-09 11:39:27 +0200 |
---|---|---|
committer | unknown <jonas@mc01.ndb.mysql.com> | 2006-06-09 11:39:27 +0200 |
commit | 26917822951431339821cfe94cf3e67dd1f3957e (patch) | |
tree | 0c497cb3fc7b3744953faaf94a5b69fad5c6dba5 /storage/ndb/src/ndbapi/NdbScanOperation.cpp | |
parent | 8b48a8e881483956a79a700d53e89e8fa5a0e162 (diff) | |
download | mariadb-git-26917822951431339821cfe94cf3e67dd1f3957e.tar.gz |
ndb - fix 5.1 scan error handling problem
Make sure that error gets set corretly also
when error code directly after taking mutex
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
Make sure that error gets set corretly also
when error code directly after taking mutex
Diffstat (limited to 'storage/ndb/src/ndbapi/NdbScanOperation.cpp')
-rw-r--r-- | storage/ndb/src/ndbapi/NdbScanOperation.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/storage/ndb/src/ndbapi/NdbScanOperation.cpp b/storage/ndb/src/ndbapi/NdbScanOperation.cpp index 6a4e657d172..49ef742a93f 100644 --- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp +++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp @@ -478,10 +478,14 @@ int NdbScanOperation::nextResultImpl(bool fetchAllowed, bool forceSend) */ PollGuard poll_guard(tp, &theNdb->theImpl->theWaiter, theNdb->theNdbBlockNumber); - if(theError.code) - return -1; - Uint32 seq = theNdbCon->theNodeSequence; + const Uint32 seq = theNdbCon->theNodeSequence; + + if(theError.code) + { + goto err4; + } + if(seq == tp->getNodeSequence(nodeId) && send_next_scan(idx, false) == 0) { @@ -564,6 +568,10 @@ int NdbScanOperation::nextResultImpl(bool fetchAllowed, bool forceSend) if(theError.code == 0) setErrorCode(4028); // seq changed = Node fail break; + case -4: +err4: + setErrorCode(theError.code); + break; } theNdbCon->theTransactionIsStarted = false; |