List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:November 10 2010 12:25pm
Subject:bzr commit into mysql-5.1-telco-6.3 branch (jonas:3337) Bug#58110
View as plain text  
#At file:///home/jonas/src/telco-6.3/ based on revid:martin.skold@stripped

 3337 Jonas Oreland	2010-11-10
      ndb - bug#58110 - fix incorrect break when doSend returns -1

    modified:
      storage/ndb/src/ndbapi/NdbTransaction.cpp
      storage/ndb/test/ndbapi/testNdbApi.cpp
=== modified file 'storage/ndb/src/ndbapi/NdbTransaction.cpp'
--- a/storage/ndb/src/ndbapi/NdbTransaction.cpp	2010-08-09 10:19:19 +0000
+++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp	2010-11-10 12:25:20 +0000
@@ -890,8 +890,7 @@ NdbTransaction::doSend()
       const Uint32 lastFlag = ((tNextOp == NULL) ? 1 : 0);
       const int tReturnCode = tOp->doSend(theDBnode, lastFlag);
       if (tReturnCode == -1) {
-        theReturnStatus = ReturnFailure;
-        break;
+        goto fail;
       }//if
       tOp = tNextOp;
     } while (tOp != NULL);
@@ -929,10 +928,12 @@ NdbTransaction::doSend()
     abort();
     break;
   }//switch
-  setOperationErrorCodeAbort(4002);
+
   theReleaseOnClose = true;
   theTransactionIsStarted = false;
   theCommitStatus = Aborted;
+fail:
+  setOperationErrorCodeAbort(4002);
   DBUG_RETURN(-1);
 }//NdbTransaction::doSend()
 

=== modified file 'storage/ndb/test/ndbapi/testNdbApi.cpp'
--- a/storage/ndb/test/ndbapi/testNdbApi.cpp	2010-11-05 10:24:22 +0000
+++ b/storage/ndb/test/ndbapi/testNdbApi.cpp	2010-11-10 12:25:20 +0000
@@ -351,6 +351,7 @@ int runTestGetValue(NDBT_Context* ctx, N
       case 880: // TUP - Read too much
       case 823: // TUP - Too much AI
       case 4257: // NDBAPI - Too much AI
+      case 4002: // NDBAPI - send problem
 	// OK errors
 	ERR(pCon->getNdbError());
 	break;


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20101110122520-qufylnc1q9v0gdu1.bundle
Thread
bzr commit into mysql-5.1-telco-6.3 branch (jonas:3337) Bug#58110Jonas Oreland10 Nov