BUG#28804 improve NDBAPI behaviour in execute on timeout waiting for txn respones.

After (a heck of a) timeout, improve teh error message we display, and
attempt a rollback of the transaction to free resources in kernel.

Remove abort for this error case too... we can mostly continue just
fine. (only VM_TRACE builds)

I don't think this is perfect yet though... the thread can still
get rather confused until we close the transaction properly at the end...
this could be something to do with how the handler should be doing
things... I'm just not too sure. Thoughts quite welcome!

===== ndb/src/ndbapi/NdbTransaction.cpp 1.59 vs edited =====
Index: ndb-work/ndb/src/ndbapi/NdbTransaction.cpp
===================================================================
--- ndb-work.orig/ndb/src/ndbapi/NdbTransaction.cpp	2007-06-29 17:52:07.474765961 +1000
+++ ndb-work/ndb/src/ndbapi/NdbTransaction.cpp	2007-06-29 17:55:59.439984906 +1000
@@ -481,12 +481,21 @@ NdbTransaction::executeNoBlobs(ExecType 
     while (1) {
       int noOfComp = tNdb->sendPollNdb(3 * timeout, 1, forceSend);
       if (noOfComp == 0) {
-        /** 
-         * This timeout situation can occur if NDB crashes.
-         */
-        ndbout << "This timeout should never occur, execute(..)" << endl;
+        time_t t;
+        t= time(NULL);
+        ndbout << "At " << asctime(localtime(&t))
+               << "WARNING: Timeout in executeNoBlobs() waiting for "
+               << "response from NDB data nodes. This should NEVER occur."
+               << " You have likely hit a NDB Bug. Please file a bug."
+               << endl;
+        DBUG_PRINT("error",("This timeout should never occure, execute()"));
+        ndbout << "Forcibly trying to rollback txn ("
+               << hex << this << dec
+               << ") to try to clean up data node resources."
+               << endl;
+        executeNoBlobs(NdbTransaction::Rollback);
 	theError.code = 4012;
-        setOperationErrorCodeAbort(4012);  // Error code for "Cluster Failure"
+        setOperationErrorCodeAbort(4012); // ndbd timeout
         DBUG_RETURN(-1);
       }//if
 
@@ -507,7 +516,6 @@ NdbTransaction::executeNoBlobs(ExecType 
         anyway += theNdb->theCompletedTransactionsArray[i] == this;
       if (anyway) {
         theNdb->printState("execute %x", this);
-        abort();
       }
 #endif
       if (theReturnStatus == ReturnFailure) {
