Commit ee578014 authored by unknown's avatar unknown

Fix AttrType moves


ndb/src/ndbapi/Makefile.am:
  Removed sources
parent 9e3522e4
...@@ -22,8 +22,7 @@ libndbapi_la_SOURCES_loc = \ ...@@ -22,8 +22,7 @@ libndbapi_la_SOURCES_loc = \
NdbOperationDefine.cpp \ NdbOperationDefine.cpp \
NdbOperationExec.cpp \ NdbOperationExec.cpp \
NdbResultSet.cpp \ NdbResultSet.cpp \
NdbCursorOperation.cpp \ NdbScanOperation.cpp NdbScanFilter.cpp \
NdbScanReceiver.cpp NdbScanOperation.cpp NdbScanFilter.cpp \
NdbIndexOperation.cpp \ NdbIndexOperation.cpp \
NdbEventOperation.cpp \ NdbEventOperation.cpp \
NdbEventOperationImpl.cpp \ NdbEventOperationImpl.cpp \
......
...@@ -1359,16 +1359,16 @@ NdbConnection::receiveTCKEY_FAILCONF(const TcKeyFailConf * failConf) ...@@ -1359,16 +1359,16 @@ NdbConnection::receiveTCKEY_FAILCONF(const TcKeyFailConf * failConf)
* in committing the transaction. * in committing the transaction.
*/ */
switch(tOp->theOperationType){ switch(tOp->theOperationType){
case UpdateRequest: case NdbOperation::UpdateRequest:
case InsertRequest: case NdbOperation::InsertRequest:
case DeleteRequest: case NdbOperation::DeleteRequest:
case WriteRequest: case NdbOperation::WriteRequest:
tOp = tOp->next(); tOp = tOp->next();
break; break;
case ReadRequest: case NdbOperation::ReadRequest:
case ReadExclusive: case NdbOperation::ReadExclusive:
case OpenScanRequest: case NdbOperation::OpenScanRequest:
case OpenRangeScanRequest: case NdbOperation::OpenRangeScanRequest:
theCompletionStatus = CompletedFailure; theCompletionStatus = CompletedFailure;
setOperationErrorCodeAbort(4115); setOperationErrorCodeAbort(4115);
tOp = NULL; tOp = NULL;
...@@ -1403,18 +1403,18 @@ NdbConnection::receiveTCKEY_FAILREF(NdbApiSignal* aSignal) ...@@ -1403,18 +1403,18 @@ NdbConnection::receiveTCKEY_FAILREF(NdbApiSignal* aSignal)
We received an indication of that this transaction was aborted due to a We received an indication of that this transaction was aborted due to a
node failure. node failure.
*/ */
if (theSendStatus == sendTC_ROLLBACK) { if (theSendStatus == NdbConnection::sendTC_ROLLBACK) {
/* /*
We were in the process of sending a rollback anyways. We will We were in the process of sending a rollback anyways. We will
report it as a success. report it as a success.
*/ */
theCompletionStatus = CompletedSuccess; theCompletionStatus = NdbConnection::CompletedSuccess;
} else { } else {
theCompletionStatus = CompletedFailure; theCompletionStatus = NdbConnection::CompletedFailure;
theError.code = 4031; theError.code = 4031;
}//if }//if
theReleaseOnClose = true; theReleaseOnClose = true;
theCommitStatus = Aborted; theCommitStatus = NdbConnection::Aborted;
return 0; return 0;
} }
return -1; return -1;
...@@ -1463,8 +1463,8 @@ NdbConnection::receiveTCINDXCONF(const TcIndxConf * indxConf, ...@@ -1463,8 +1463,8 @@ NdbConnection::receiveTCINDXCONF(const TcIndxConf * indxConf,
// no Commit flag set. This is clearly an anomaly. // no Commit flag set. This is clearly an anomaly.
/**********************************************************************/ /**********************************************************************/
theError.code = 4011; theError.code = 4011;
theCompletionStatus = CompletedFailure; theCompletionStatus = NdbConnection::CompletedFailure;
theCommitStatus = Aborted; theCommitStatus = NdbConnection::Aborted;
return 0; return 0;
}//if }//if
if (tNoComp >= tNoSent) { if (tNoComp >= tNoSent) {
...@@ -1497,8 +1497,8 @@ NdbConnection::receiveTCINDXREF( NdbApiSignal* aSignal) ...@@ -1497,8 +1497,8 @@ NdbConnection::receiveTCINDXREF( NdbApiSignal* aSignal)
/* and we only need to report completion and return with the */ /* and we only need to report completion and return with the */
/* error code to the application. */ /* error code to the application. */
/**********************************************************************/ /**********************************************************************/
theCompletionStatus = CompletedFailure; theCompletionStatus = NdbConnection::CompletedFailure;
theCommitStatus = Aborted; theCommitStatus = NdbConnection::Aborted;
return 0; return 0;
} }
return -1; return -1;
...@@ -1517,7 +1517,7 @@ NdbConnection::OpCompleteFailure() ...@@ -1517,7 +1517,7 @@ NdbConnection::OpCompleteFailure()
{ {
Uint32 tNoComp = theNoOfOpCompleted; Uint32 tNoComp = theNoOfOpCompleted;
Uint32 tNoSent = theNoOfOpSent; Uint32 tNoSent = theNoOfOpSent;
theCompletionStatus = CompletedFailure; theCompletionStatus = NdbConnection::CompletedFailure;
tNoComp++; tNoComp++;
theNoOfOpCompleted = tNoComp; theNoOfOpCompleted = tNoComp;
if (tNoComp == tNoSent) { if (tNoComp == tNoSent) {
...@@ -1528,7 +1528,7 @@ NdbConnection::OpCompleteFailure() ...@@ -1528,7 +1528,7 @@ NdbConnection::OpCompleteFailure()
//operation is not really part of that transaction. //operation is not really part of that transaction.
//------------------------------------------------------------------------ //------------------------------------------------------------------------
if (theSimpleState == 1) { if (theSimpleState == 1) {
theCommitStatus = Aborted; theCommitStatus = NdbConnection::Aborted;
}//if }//if
return 0; // Last operation received return 0; // Last operation received
} else if (tNoComp > tNoSent) { } else if (tNoComp > tNoSent) {
...@@ -1556,7 +1556,7 @@ NdbConnection::OpCompleteSuccess() ...@@ -1556,7 +1556,7 @@ NdbConnection::OpCompleteSuccess()
theNoOfOpCompleted = tNoComp; theNoOfOpCompleted = tNoComp;
if (tNoComp == tNoSent) { // Last operation completed if (tNoComp == tNoSent) { // Last operation completed
if (theSimpleState == 1) { if (theSimpleState == 1) {
theCommitStatus = Committed; theCommitStatus = NdbConnection::Committed;
}//if }//if
return 0; return 0;
} else if (tNoComp < tNoSent) { } else if (tNoComp < tNoSent) {
...@@ -1564,7 +1564,7 @@ NdbConnection::OpCompleteSuccess() ...@@ -1564,7 +1564,7 @@ NdbConnection::OpCompleteSuccess()
} else { } else {
setOperationErrorCodeAbort(4113); // Too many operations, setOperationErrorCodeAbort(4113); // Too many operations,
// stop waiting for more // stop waiting for more
theCompletionStatus = CompletedFailure; theCompletionStatus = NdbConnection::CompletedFailure;
return 0; return 0;
}//if }//if
}//NdbConnection::OpCompleteSuccess() }//NdbConnection::OpCompleteSuccess()
...@@ -1577,7 +1577,7 @@ Remark: Get global checkpoint identity of the transaction ...@@ -1577,7 +1577,7 @@ Remark: Get global checkpoint identity of the transaction
int int
NdbConnection::getGCI() NdbConnection::getGCI()
{ {
if (theCommitStatus == Committed) { if (theCommitStatus == NdbConnection::Committed) {
return theGlobalCheckpointId; return theGlobalCheckpointId;
}//if }//if
return 0; return 0;
......
...@@ -439,7 +439,7 @@ NdbScanOperation::executeCursor(int nodeId){ ...@@ -439,7 +439,7 @@ NdbScanOperation::executeCursor(int nodeId){
TRACE_DEBUG("The node is stopping when attempting to start a scan"); TRACE_DEBUG("The node is stopping when attempting to start a scan");
setErrorCode(4030); setErrorCode(4030);
}//if }//if
tCon->theCommitStatus = Aborted; tCon->theCommitStatus = NdbConnection::Aborted;
}//if }//if
return -1; return -1;
} }
...@@ -709,8 +709,8 @@ NdbScanOperation::execCLOSE_SCAN_REP(Uint32 errCode){ ...@@ -709,8 +709,8 @@ NdbScanOperation::execCLOSE_SCAN_REP(Uint32 errCode){
/** /**
* Normal termination * Normal termination
*/ */
theNdbCon->theCommitStatus = Committed; theNdbCon->theCommitStatus = NdbConnection::Committed;
theNdbCon->theCompletionStatus = CompletedSuccess; theNdbCon->theCompletionStatus = NdbConnection::CompletedSuccess;
} else { } else {
/** /**
* Something is fishy * Something is fishy
...@@ -1111,7 +1111,7 @@ NdbIndexScanOperation::fix_get_values(){ ...@@ -1111,7 +1111,7 @@ NdbIndexScanOperation::fix_get_values(){
NdbRecAttr * curr = theReceiver.theFirstRecAttr; NdbRecAttr * curr = theReceiver.theFirstRecAttr;
Uint32 cnt = m_sort_columns; Uint32 cnt = m_sort_columns;
assert(cnt < MAXNROFTUPLEKEY); assert(cnt < NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY);
Uint32 idx = 0; Uint32 idx = 0;
NdbTableImpl * tab = m_currentTable; NdbTableImpl * tab = m_currentTable;
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "NdbApiSignal.hpp" #include "NdbApiSignal.hpp"
#include "AttrType.hpp"
#include "NdbImpl.hpp" #include "NdbImpl.hpp"
#include "NdbOperation.hpp" #include "NdbOperation.hpp"
#include "NdbIndexOperation.hpp" #include "NdbIndexOperation.hpp"
...@@ -255,8 +254,8 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId) ...@@ -255,8 +254,8 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId)
for (int i = tNoSentTransactions - 1; i >= 0; i--) { for (int i = tNoSentTransactions - 1; i >= 0; i--) {
NdbConnection* localCon = theSentTransactionsArray[i]; NdbConnection* localCon = theSentTransactionsArray[i];
if (localCon->getConnectedNodeId() == aNodeId ) { if (localCon->getConnectedNodeId() == aNodeId ) {
const SendStatusType sendStatus = localCon->theSendStatus; const NdbConnection::SendStatusType sendStatus = localCon->theSendStatus;
if (sendStatus == sendTC_OP || sendStatus == sendTC_COMMIT) { if (sendStatus == NdbConnection::sendTC_OP || sendStatus == NdbConnection::sendTC_COMMIT) {
/* /*
A transaction was interrupted in the prepare phase by a node A transaction was interrupted in the prepare phase by a node
failure. Since the transaction was not found in the phase failure. Since the transaction was not found in the phase
...@@ -264,13 +263,13 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId) ...@@ -264,13 +263,13 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId)
we report a normal node failure abort. we report a normal node failure abort.
*/ */
localCon->setOperationErrorCodeAbort(4010); localCon->setOperationErrorCodeAbort(4010);
localCon->theCompletionStatus = CompletedFailure; localCon->theCompletionStatus = NdbConnection::CompletedFailure;
} else if (sendStatus == sendTC_ROLLBACK) { } else if (sendStatus == NdbConnection::sendTC_ROLLBACK) {
/* /*
We aimed for abort and abort we got even if it was by a node We aimed for abort and abort we got even if it was by a node
failure. We will thus report it as a success. failure. We will thus report it as a success.
*/ */
localCon->theCompletionStatus = CompletedSuccess; localCon->theCompletionStatus = NdbConnection::CompletedSuccess;
} else { } else {
#ifdef VM_TRACE #ifdef VM_TRACE
printState("abortTransactionsAfterNodeFailure %x", this); printState("abortTransactionsAfterNodeFailure %x", this);
...@@ -282,7 +281,7 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId) ...@@ -282,7 +281,7 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId)
intact since the node was failing and they were aborted. Thus we intact since the node was failing and they were aborted. Thus we
set commit state to Aborted and set state to release on close. set commit state to Aborted and set state to release on close.
*/ */
localCon->theCommitStatus = Aborted; localCon->theCommitStatus = NdbConnection::Aborted;
localCon->theReleaseOnClose = true; localCon->theReleaseOnClose = true;
completedTransaction(localCon); completedTransaction(localCon);
}//if }//if
...@@ -331,7 +330,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) ...@@ -331,7 +330,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
tCon = void2con(tFirstDataPtr); tCon = void2con(tFirstDataPtr);
if ((tCon->checkMagicNumber() == 0) && if ((tCon->checkMagicNumber() == 0) &&
(tCon->theSendStatus == sendTC_OP)) { (tCon->theSendStatus == NdbConnection::sendTC_OP)) {
tReturnCode = tCon->receiveTCKEYCONF(keyConf, tLen); tReturnCode = tCon->receiveTCKEYCONF(keyConf, tLen);
if (tReturnCode != -1) { if (tReturnCode != -1) {
completedTransaction(tCon); completedTransaction(tCon);
...@@ -402,8 +401,8 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) ...@@ -402,8 +401,8 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
if (tOp->checkMagicNumber() == 0) { if (tOp->checkMagicNumber() == 0) {
tCon = tOp->theNdbCon; tCon = tOp->theNdbCon;
if (tCon != NULL) { if (tCon != NULL) {
if ((tCon->theSendStatus == sendTC_OP) || if ((tCon->theSendStatus == NdbConnection::sendTC_OP) ||
(tCon->theSendStatus == sendTC_COMMIT)) { (tCon->theSendStatus == NdbConnection::sendTC_COMMIT)) {
tReturnCode = tCon->receiveTCKEY_FAILCONF(failConf); tReturnCode = tCon->receiveTCKEY_FAILCONF(failConf);
if (tReturnCode != -1) { if (tReturnCode != -1) {
completedTransaction(tCon); completedTransaction(tCon);
...@@ -429,8 +428,8 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) ...@@ -429,8 +428,8 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
if (tOp->checkMagicNumber() == 0) { if (tOp->checkMagicNumber() == 0) {
tCon = tOp->theNdbCon; tCon = tOp->theNdbCon;
if (tCon != NULL) { if (tCon != NULL) {
if ((tCon->theSendStatus == sendTC_OP) || if ((tCon->theSendStatus == NdbConnection::sendTC_OP) ||
(tCon->theSendStatus == sendTC_ROLLBACK)) { (tCon->theSendStatus == NdbConnection::sendTC_ROLLBACK)) {
tReturnCode = tCon->receiveTCKEY_FAILREF(aSignal); tReturnCode = tCon->receiveTCKEY_FAILREF(aSignal);
if (tReturnCode != -1) { if (tReturnCode != -1) {
completedTransaction(tCon); completedTransaction(tCon);
...@@ -450,7 +449,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) ...@@ -450,7 +449,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
if (tOp->checkMagicNumber() == 0) { if (tOp->checkMagicNumber() == 0) {
tCon = tOp->theNdbCon; tCon = tOp->theNdbCon;
if (tCon != NULL) { if (tCon != NULL) {
if (tCon->theSendStatus == sendTC_OP) { if (tCon->theSendStatus == NdbConnection::sendTC_OP) {
tReturnCode = tOp->receiveTCKEYREF(aSignal); tReturnCode = tOp->receiveTCKEYREF(aSignal);
if (tReturnCode != -1) { if (tReturnCode != -1) {
completedTransaction(tCon); completedTransaction(tCon);
...@@ -472,7 +471,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) ...@@ -472,7 +471,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
tCon = void2con(tFirstDataPtr); tCon = void2con(tFirstDataPtr);
if ((tCon->checkMagicNumber() == 0) && if ((tCon->checkMagicNumber() == 0) &&
(tCon->theSendStatus == sendTC_COMMIT)) { (tCon->theSendStatus == NdbConnection::sendTC_COMMIT)) {
tReturnCode = tCon->receiveTC_COMMITCONF(commitConf); tReturnCode = tCon->receiveTC_COMMITCONF(commitConf);
if (tReturnCode != -1) { if (tReturnCode != -1) {
completedTransaction(tCon); completedTransaction(tCon);
...@@ -497,7 +496,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) ...@@ -497,7 +496,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
tCon = void2con(tFirstDataPtr); tCon = void2con(tFirstDataPtr);
if ((tCon->checkMagicNumber() == 0) && if ((tCon->checkMagicNumber() == 0) &&
(tCon->theSendStatus == sendTC_COMMIT)) { (tCon->theSendStatus == NdbConnection::sendTC_COMMIT)) {
tReturnCode = tCon->receiveTC_COMMITREF(aSignal); tReturnCode = tCon->receiveTC_COMMITREF(aSignal);
if (tReturnCode != -1) { if (tReturnCode != -1) {
completedTransaction(tCon); completedTransaction(tCon);
...@@ -513,7 +512,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) ...@@ -513,7 +512,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
tCon = void2con(tFirstDataPtr); tCon = void2con(tFirstDataPtr);
if ((tCon->checkMagicNumber() == 0) && if ((tCon->checkMagicNumber() == 0) &&
(tCon->theSendStatus == sendTC_ROLLBACK)) { (tCon->theSendStatus == NdbConnection::sendTC_ROLLBACK)) {
tReturnCode = tCon->receiveTCROLLBACKCONF(aSignal); tReturnCode = tCon->receiveTCROLLBACKCONF(aSignal);
if (tReturnCode != -1) { if (tReturnCode != -1) {
completedTransaction(tCon); completedTransaction(tCon);
...@@ -528,7 +527,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) ...@@ -528,7 +527,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
tCon = void2con(tFirstDataPtr); tCon = void2con(tFirstDataPtr);
if ((tCon->checkMagicNumber() == 0) && if ((tCon->checkMagicNumber() == 0) &&
(tCon->theSendStatus == sendTC_ROLLBACK)) { (tCon->theSendStatus == NdbConnection::sendTC_ROLLBACK)) {
tReturnCode = tCon->receiveTCROLLBACKREF(aSignal); tReturnCode = tCon->receiveTCROLLBACKREF(aSignal);
if (tReturnCode != -1) { if (tReturnCode != -1) {
completedTransaction(tCon); completedTransaction(tCon);
...@@ -762,7 +761,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) ...@@ -762,7 +761,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
const BlockReference aTCRef = aSignal->theSendersBlockRef; const BlockReference aTCRef = aSignal->theSendersBlockRef;
tCon = void2con(tFirstDataPtr); tCon = void2con(tFirstDataPtr);
if ((tCon->checkMagicNumber() == 0) && if ((tCon->checkMagicNumber() == 0) &&
(tCon->theSendStatus == sendTC_OP)) { (tCon->theSendStatus == NdbConnection::sendTC_OP)) {
tReturnCode = tCon->receiveTCINDXCONF(indxConf, tLen); tReturnCode = tCon->receiveTCINDXCONF(indxConf, tLen);
if (tReturnCode != -1) { if (tReturnCode != -1) {
completedTransaction(tCon); completedTransaction(tCon);
...@@ -785,7 +784,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) ...@@ -785,7 +784,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3])
if (tIndexOp->checkMagicNumber() == 0) { if (tIndexOp->checkMagicNumber() == 0) {
tCon = tIndexOp->theNdbCon; tCon = tIndexOp->theNdbCon;
if (tCon != NULL) { if (tCon != NULL) {
if (tCon->theSendStatus == sendTC_OP) { if (tCon->theSendStatus == NdbConnection::sendTC_OP) {
tReturnCode = tIndexOp->receiveTCINDXREF(aSignal); tReturnCode = tIndexOp->receiveTCINDXREF(aSignal);
if (tReturnCode != -1) { if (tReturnCode != -1) {
completedTransaction(tCon); completedTransaction(tCon);
...@@ -839,7 +838,7 @@ Ndb::completedTransaction(NdbConnection* aCon) ...@@ -839,7 +838,7 @@ Ndb::completedTransaction(NdbConnection* aCon)
Uint32 tTransArrayIndex = aCon->theTransArrayIndex; Uint32 tTransArrayIndex = aCon->theTransArrayIndex;
Uint32 tNoSentTransactions = theNoOfSentTransactions; Uint32 tNoSentTransactions = theNoOfSentTransactions;
Uint32 tNoCompletedTransactions = theNoOfCompletedTransactions; Uint32 tNoCompletedTransactions = theNoOfCompletedTransactions;
if ((tNoSentTransactions > 0) && (aCon->theListState == InSendList) && if ((tNoSentTransactions > 0) && (aCon->theListState == NdbConnection::InSendList) &&
(tTransArrayIndex < tNoSentTransactions)) { (tTransArrayIndex < tNoSentTransactions)) {
NdbConnection* tMoveCon = theSentTransactionsArray[tNoSentTransactions - 1]; NdbConnection* tMoveCon = theSentTransactionsArray[tNoSentTransactions - 1];
...@@ -853,7 +852,7 @@ Ndb::completedTransaction(NdbConnection* aCon) ...@@ -853,7 +852,7 @@ Ndb::completedTransaction(NdbConnection* aCon)
theNoOfCompletedTransactions = tNoCompletedTransactions + 1; theNoOfCompletedTransactions = tNoCompletedTransactions + 1;
theNoOfSentTransactions = tNoSentTransactions - 1; theNoOfSentTransactions = tNoSentTransactions - 1;
aCon->theListState = InCompletedList; aCon->theListState = NdbConnection::InCompletedList;
aCon->handleExecuteCompletion(); aCon->handleExecuteCompletion();
if ((theMinNoOfEventsToWakeUp != 0) && if ((theMinNoOfEventsToWakeUp != 0) &&
(theNoOfCompletedTransactions >= theMinNoOfEventsToWakeUp)) { (theNoOfCompletedTransactions >= theMinNoOfEventsToWakeUp)) {
...@@ -888,7 +887,7 @@ Ndb::reportCallback(NdbConnection** aCopyArray, Uint32 aNoOfCompletedTrans) ...@@ -888,7 +887,7 @@ Ndb::reportCallback(NdbConnection** aCopyArray, Uint32 aNoOfCompletedTrans)
NdbAsynchCallback aCallback = aCopyArray[i]->theCallbackFunction; NdbAsynchCallback aCallback = aCopyArray[i]->theCallbackFunction;
int tResult = 0; int tResult = 0;
if (aCallback != NULL) { if (aCallback != NULL) {
if (aCopyArray[i]->theReturnStatus == ReturnFailure) { if (aCopyArray[i]->theReturnStatus == NdbConnection::ReturnFailure) {
tResult = -1; tResult = -1;
}//if }//if
(*aCallback)(tResult, aCopyArray[i], anyObject); (*aCallback)(tResult, aCopyArray[i], anyObject);
...@@ -912,13 +911,13 @@ Ndb::pollCompleted(NdbConnection** aCopyArray) ...@@ -912,13 +911,13 @@ Ndb::pollCompleted(NdbConnection** aCopyArray)
if (tNoCompletedTransactions > 0) { if (tNoCompletedTransactions > 0) {
for (i = 0; i < tNoCompletedTransactions; i++) { for (i = 0; i < tNoCompletedTransactions; i++) {
aCopyArray[i] = theCompletedTransactionsArray[i]; aCopyArray[i] = theCompletedTransactionsArray[i];
if (aCopyArray[i]->theListState != InCompletedList) { if (aCopyArray[i]->theListState != NdbConnection::InCompletedList) {
ndbout << "pollCompleted error "; ndbout << "pollCompleted error ";
ndbout << aCopyArray[i]->theListState << endl; ndbout << aCopyArray[i]->theListState << endl;
abort(); abort();
}//if }//if
theCompletedTransactionsArray[i] = NULL; theCompletedTransactionsArray[i] = NULL;
aCopyArray[i]->theListState = NotInList; aCopyArray[i]->theListState = NdbConnection::NotInList;
}//for }//for
}//if }//if
theNoOfCompletedTransactions = 0; theNoOfCompletedTransactions = 0;
...@@ -940,8 +939,8 @@ Ndb::check_send_timeout() ...@@ -940,8 +939,8 @@ Ndb::check_send_timeout()
a_con->printState(); a_con->printState();
#endif #endif
a_con->setOperationErrorCodeAbort(4012); a_con->setOperationErrorCodeAbort(4012);
a_con->theCommitStatus = Aborted; a_con->theCommitStatus = NdbConnection::Aborted;
a_con->theCompletionStatus = CompletedFailure; a_con->theCompletionStatus = NdbConnection::CompletedFailure;
a_con->handleExecuteCompletion(); a_con->handleExecuteCompletion();
remove_sent_list(i); remove_sent_list(i);
insert_completed_list(a_con); insert_completed_list(a_con);
...@@ -970,7 +969,7 @@ Ndb::insert_completed_list(NdbConnection* a_con) ...@@ -970,7 +969,7 @@ Ndb::insert_completed_list(NdbConnection* a_con)
Uint32 no_of_comp = theNoOfCompletedTransactions; Uint32 no_of_comp = theNoOfCompletedTransactions;
theCompletedTransactionsArray[no_of_comp] = a_con; theCompletedTransactionsArray[no_of_comp] = a_con;
theNoOfCompletedTransactions = no_of_comp + 1; theNoOfCompletedTransactions = no_of_comp + 1;
a_con->theListState = InCompletedList; a_con->theListState = NdbConnection::InCompletedList;
a_con->theTransArrayIndex = no_of_comp; a_con->theTransArrayIndex = no_of_comp;
return no_of_comp; return no_of_comp;
} }
...@@ -981,7 +980,7 @@ Ndb::insert_sent_list(NdbConnection* a_con) ...@@ -981,7 +980,7 @@ Ndb::insert_sent_list(NdbConnection* a_con)
Uint32 no_of_sent = theNoOfSentTransactions; Uint32 no_of_sent = theNoOfSentTransactions;
theSentTransactionsArray[no_of_sent] = a_con; theSentTransactionsArray[no_of_sent] = a_con;
theNoOfSentTransactions = no_of_sent + 1; theNoOfSentTransactions = no_of_sent + 1;
a_con->theListState = InSendList; a_con->theListState = NdbConnection::InSendList;
a_con->theTransArrayIndex = no_of_sent; a_con->theTransArrayIndex = no_of_sent;
return no_of_sent; return no_of_sent;
} }
...@@ -1019,10 +1018,10 @@ Ndb::sendPrepTrans(int forceSend) ...@@ -1019,10 +1018,10 @@ Ndb::sendPrepTrans(int forceSend)
if ((tp->getNodeSequence(node_id) == a_con->theNodeSequence) && if ((tp->getNodeSequence(node_id) == a_con->theNodeSequence) &&
tp->get_node_alive(node_id) || tp->get_node_alive(node_id) ||
(tp->get_node_stopping(node_id) && (tp->get_node_stopping(node_id) &&
((a_con->theSendStatus == sendABORT) || ((a_con->theSendStatus == NdbConnection::sendABORT) ||
(a_con->theSendStatus == sendABORTfail) || (a_con->theSendStatus == NdbConnection::sendABORTfail) ||
(a_con->theSendStatus == sendCOMMITstate) || (a_con->theSendStatus == NdbConnection::sendCOMMITstate) ||
(a_con->theSendStatus == sendCompleted)))) { (a_con->theSendStatus == NdbConnection::sendCompleted)))) {
/* /*
We will send if We will send if
1) Node is alive and sequences are correct OR 1) Node is alive and sequences are correct OR
...@@ -1054,13 +1053,13 @@ Ndb::sendPrepTrans(int forceSend) ...@@ -1054,13 +1053,13 @@ Ndb::sendPrepTrans(int forceSend)
again and will thus set the state to Aborted to avoid a more or again and will thus set the state to Aborted to avoid a more or
less eternal loop of tries. less eternal loop of tries.
*/ */
if (a_con->theSendStatus == sendOperations) { if (a_con->theSendStatus == NdbConnection::sendOperations) {
a_con->setOperationErrorCodeAbort(4021); a_con->setOperationErrorCodeAbort(4021);
a_con->theCommitStatus = NeedAbort; a_con->theCommitStatus = NdbConnection::NeedAbort;
TRACE_DEBUG("Send buffer full and sendOperations"); TRACE_DEBUG("Send buffer full and sendOperations");
} else { } else {
a_con->setOperationErrorCodeAbort(4026); a_con->setOperationErrorCodeAbort(4026);
a_con->theCommitStatus = Aborted; a_con->theCommitStatus = NdbConnection::Aborted;
TRACE_DEBUG("Send buffer full, set state to Aborted"); TRACE_DEBUG("Send buffer full, set state to Aborted");
}//if }//if
}//if }//if
...@@ -1077,7 +1076,7 @@ Ndb::sendPrepTrans(int forceSend) ...@@ -1077,7 +1076,7 @@ Ndb::sendPrepTrans(int forceSend)
*/ */
TRACE_DEBUG("Abort a transaction when stopping a node"); TRACE_DEBUG("Abort a transaction when stopping a node");
a_con->setOperationErrorCodeAbort(4023); a_con->setOperationErrorCodeAbort(4023);
a_con->theCommitStatus = NeedAbort; a_con->theCommitStatus = NdbConnection::NeedAbort;
} else { } else {
/* /*
The node is hard dead and we cannot continue. We will also release The node is hard dead and we cannot continue. We will also release
...@@ -1087,10 +1086,10 @@ Ndb::sendPrepTrans(int forceSend) ...@@ -1087,10 +1086,10 @@ Ndb::sendPrepTrans(int forceSend)
a_con->setOperationErrorCodeAbort(4025); a_con->setOperationErrorCodeAbort(4025);
a_con->theReleaseOnClose = true; a_con->theReleaseOnClose = true;
a_con->theTransactionIsStarted = false; a_con->theTransactionIsStarted = false;
a_con->theCommitStatus = Aborted; a_con->theCommitStatus = NdbConnection::Aborted;
}//if }//if
}//if }//if
a_con->theCompletionStatus = CompletedFailure; a_con->theCompletionStatus = NdbConnection::CompletedFailure;
a_con->handleExecuteCompletion(); a_con->handleExecuteCompletion();
insert_completed_list(a_con); insert_completed_list(a_con);
}//for }//for
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment