diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-12-23 11:21:01 +0100 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-12-23 11:21:01 +0100 |
commit | 356d343ced28673b4dd76f3600aaf535099979a4 (patch) | |
tree | 98ab28712f22e6f7c9bb588452c63480e54754a5 /ndb/src/ndbapi/Ndbif.cpp | |
parent | fde8d07de354dda6d9d9b45d3295a8fb17d53e17 (diff) | |
download | mariadb-git-356d343ced28673b4dd76f3600aaf535099979a4.tar.gz |
backwards compatible name change NdbConnectionto NdbTransaction
removed friend declarations from doxygen
updated some documentation in mgmapi
BitKeeper/deleted/.del-NdbCursorOperation.hpp~da121aeaf101b136:
Delete: ndb/include/ndbapi/NdbCursorOperation.hpp
BitKeeper/deleted/.del-NdbCursorOperation.cpp~8d49480ced2deba5:
Delete: ndb/src/ndbapi/NdbCursorOperation.cpp
ndb/include/Makefile.am:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/kernel/signaldata/ScanTab.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/kernel/signaldata/TcCommit.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/kernel/signaldata/TcHbRep.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/kernel/signaldata/TcIndx.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/kernel/signaldata/TcKeyConf.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/kernel/signaldata/TcKeyFailConf.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/kernel/signaldata/TcRollbackRep.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/kernel/signaldata/TransIdAI.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/mgmapi/mgmapi.h:
backwards compatible name change NdbConnectionto NdbTransaction
documented some missing things in mgmapi
ndb/include/ndbapi/Ndb.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/ndbapi/NdbApi.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/ndbapi/NdbBlob.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/ndbapi/NdbDictionary.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/ndbapi/NdbEventOperation.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/ndbapi/NdbIndexOperation.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/ndbapi/NdbIndexScanOperation.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/ndbapi/NdbOperation.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/ndbapi/NdbRecAttr.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/ndbapi/NdbReceiver.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/ndbapi/NdbScanFilter.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/ndbapi/NdbScanOperation.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/include/ndbapi/NdbTransaction.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/Makefile.am:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/Ndb.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbApiSignal.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbBlob.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbImpl.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbIndexOperation.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbOperation.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbOperationDefine.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbOperationExec.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbOperationInt.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbOperationSearch.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbReceiver.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbScanOperation.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbTransaction.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/NdbTransactionScan.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/Ndberr.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/Ndbif.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/Ndbinit.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/src/ndbapi/Ndblist.cpp:
backwards compatible name change NdbConnectionto NdbTransaction
ndb/tools/restore/consumer_restore.hpp:
backwards compatible name change NdbConnectionto NdbTransaction
sql/ha_ndbcluster.h:
backwards compatible name change NdbConnectionto NdbTransaction
Diffstat (limited to 'ndb/src/ndbapi/Ndbif.cpp')
-rw-r--r-- | ndb/src/ndbapi/Ndbif.cpp | 139 |
1 files changed, 69 insertions, 70 deletions
diff --git a/ndb/src/ndbapi/Ndbif.cpp b/ndb/src/ndbapi/Ndbif.cpp index 12ab85d2895..86be84e0b6c 100644 --- a/ndb/src/ndbapi/Ndbif.cpp +++ b/ndb/src/ndbapi/Ndbif.cpp @@ -19,12 +19,11 @@ #include "NdbApiSignal.hpp" #include "NdbImpl.hpp" -#include "NdbOperation.hpp" -#include "NdbIndexOperation.hpp" -#include "NdbScanOperation.hpp" -#include "NdbConnection.hpp" -#include "NdbRecAttr.hpp" -#include "NdbReceiver.hpp" +#include <NdbOperation.hpp> +#include <NdbIndexOperation.hpp> +#include <NdbScanOperation.hpp> +#include <NdbRecAttr.hpp> +#include <NdbReceiver.hpp> #include "API.hpp" #include <signaldata/TcCommit.hpp> @@ -113,9 +112,9 @@ Ndb::init(int aMaxNoOfTransactions) }//if theMaxNoOfTransactions = tMaxNoOfTransactions; - thePreparedTransactionsArray = new NdbConnection* [tMaxNoOfTransactions]; - theSentTransactionsArray = new NdbConnection* [tMaxNoOfTransactions]; - theCompletedTransactionsArray = new NdbConnection* [tMaxNoOfTransactions]; + thePreparedTransactionsArray = new NdbTransaction* [tMaxNoOfTransactions]; + theSentTransactionsArray = new NdbTransaction* [tMaxNoOfTransactions]; + theCompletedTransactionsArray = new NdbTransaction* [tMaxNoOfTransactions]; if ((thePreparedTransactionsArray == NULL) || (theSentTransactionsArray == NULL) || @@ -271,11 +270,11 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId) { Uint32 tNoSentTransactions = theNoOfSentTransactions; for (int i = tNoSentTransactions - 1; i >= 0; i--) { - NdbConnection* localCon = theSentTransactionsArray[i]; + NdbTransaction* localCon = theSentTransactionsArray[i]; if (localCon->getConnectedNodeId() == aNodeId) { - const NdbConnection::SendStatusType sendStatus = localCon->theSendStatus; - if (sendStatus == NdbConnection::sendTC_OP || - sendStatus == NdbConnection::sendTC_COMMIT) { + const NdbTransaction::SendStatusType sendStatus = localCon->theSendStatus; + if (sendStatus == NdbTransaction::sendTC_OP || + sendStatus == NdbTransaction::sendTC_COMMIT) { /* A transaction was interrupted in the prepare phase by a node failure. Since the transaction was not found in the phase @@ -283,13 +282,13 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId) we report a normal node failure abort. */ localCon->setOperationErrorCodeAbort(4010); - localCon->theCompletionStatus = NdbConnection::CompletedFailure; - } else if (sendStatus == NdbConnection::sendTC_ROLLBACK) { + localCon->theCompletionStatus = NdbTransaction::CompletedFailure; + } else if (sendStatus == NdbTransaction::sendTC_ROLLBACK) { /* We aimed for abort and abort we got even if it was by a node failure. We will thus report it as a success. */ - localCon->theCompletionStatus = NdbConnection::CompletedSuccess; + localCon->theCompletionStatus = NdbTransaction::CompletedSuccess; } else { #ifdef VM_TRACE printState("abortTransactionsAfterNodeFailure %x", this); @@ -301,8 +300,8 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId) intact since the node was failing and they were aborted. Thus we set commit state to Aborted and set state to release on close. */ - localCon->theReturnStatus = NdbConnection::ReturnFailure; - localCon->theCommitStatus = NdbConnection::Aborted; + localCon->theReturnStatus = NdbTransaction::ReturnFailure; + localCon->theCommitStatus = NdbTransaction::Aborted; localCon->theReleaseOnClose = true; completedTransaction(localCon); } @@ -325,7 +324,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) { NdbOperation* tOp; NdbIndexOperation* tIndexOp; - NdbConnection* tCon; + NdbTransaction* tCon; int tReturnCode = -1; const Uint32* tDataPtr = aSignal->getDataPtr(); const Uint32 tWaitState = theWaiter.m_state; @@ -355,14 +354,14 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) tCon = void2con(tFirstDataPtr); if ((tCon->checkMagicNumber() == 0) && - (tCon->theSendStatus == NdbConnection::sendTC_OP)) { + (tCon->theSendStatus == NdbTransaction::sendTC_OP)) { tReturnCode = tCon->receiveTCKEYCONF(keyConf, tLen); if (tReturnCode != -1) { completedTransaction(tCon); }//if if(TcKeyConf::getMarkerFlag(keyConf->confInfo)){ - NdbConnection::sendTC_COMMIT_ACK(theCommitAckSignal, + NdbTransaction::sendTC_COMMIT_ACK(theCommitAckSignal, keyConf->transId1, keyConf->transId2, aTCRef); @@ -426,8 +425,8 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) if (tOp->checkMagicNumber(false) == 0) { tCon = tOp->theNdbCon; if (tCon != NULL) { - if ((tCon->theSendStatus == NdbConnection::sendTC_OP) || - (tCon->theSendStatus == NdbConnection::sendTC_COMMIT)) { + if ((tCon->theSendStatus == NdbTransaction::sendTC_OP) || + (tCon->theSendStatus == NdbTransaction::sendTC_COMMIT)) { tReturnCode = tCon->receiveTCKEY_FAILCONF(failConf); if (tReturnCode != -1) { completedTransaction(tCon); @@ -441,7 +440,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) #endif } if(tFirstData & 1){ - NdbConnection::sendTC_COMMIT_ACK(theCommitAckSignal, + NdbTransaction::sendTC_COMMIT_ACK(theCommitAckSignal, failConf->transId1, failConf->transId2, aTCRef); @@ -456,8 +455,8 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) if (tOp->checkMagicNumber() == 0) { tCon = tOp->theNdbCon; if (tCon != NULL) { - if ((tCon->theSendStatus == NdbConnection::sendTC_OP) || - (tCon->theSendStatus == NdbConnection::sendTC_ROLLBACK)) { + if ((tCon->theSendStatus == NdbTransaction::sendTC_OP) || + (tCon->theSendStatus == NdbTransaction::sendTC_ROLLBACK)) { tReturnCode = tCon->receiveTCKEY_FAILREF(aSignal); if (tReturnCode != -1) { completedTransaction(tCon); @@ -482,7 +481,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) if (tOp->checkMagicNumber() == 0) { tCon = tOp->theNdbCon; if (tCon != NULL) { - if (tCon->theSendStatus == NdbConnection::sendTC_OP) { + if (tCon->theSendStatus == NdbTransaction::sendTC_OP) { tReturnCode = tOp->receiveTCKEYREF(aSignal); if (tReturnCode != -1) { completedTransaction(tCon); @@ -505,14 +504,14 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) tCon = void2con(tFirstDataPtr); if ((tCon->checkMagicNumber() == 0) && - (tCon->theSendStatus == NdbConnection::sendTC_COMMIT)) { + (tCon->theSendStatus == NdbTransaction::sendTC_COMMIT)) { tReturnCode = tCon->receiveTC_COMMITCONF(commitConf); if (tReturnCode != -1) { completedTransaction(tCon); }//if if(tFirstData & 1){ - NdbConnection::sendTC_COMMIT_ACK(theCommitAckSignal, + NdbTransaction::sendTC_COMMIT_ACK(theCommitAckSignal, commitConf->transId1, commitConf->transId2, aTCRef); @@ -530,7 +529,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) tCon = void2con(tFirstDataPtr); if ((tCon->checkMagicNumber() == 0) && - (tCon->theSendStatus == NdbConnection::sendTC_COMMIT)) { + (tCon->theSendStatus == NdbTransaction::sendTC_COMMIT)) { tReturnCode = tCon->receiveTC_COMMITREF(aSignal); if (tReturnCode != -1) { completedTransaction(tCon); @@ -545,7 +544,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) tCon = void2con(tFirstDataPtr); if ((tCon->checkMagicNumber() == 0) && - (tCon->theSendStatus == NdbConnection::sendTC_ROLLBACK)) { + (tCon->theSendStatus == NdbTransaction::sendTC_ROLLBACK)) { tReturnCode = tCon->receiveTCROLLBACKCONF(aSignal); if (tReturnCode != -1) { completedTransaction(tCon); @@ -560,7 +559,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) tCon = void2con(tFirstDataPtr); if ((tCon->checkMagicNumber() == 0) && - (tCon->theSendStatus == NdbConnection::sendTC_ROLLBACK)) { + (tCon->theSendStatus == NdbTransaction::sendTC_ROLLBACK)) { tReturnCode = tCon->receiveTCROLLBACKREF(aSignal); if (tReturnCode != -1) { completedTransaction(tCon); @@ -797,7 +796,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) const BlockReference aTCRef = aSignal->theSendersBlockRef; tCon = void2con(tFirstDataPtr); if ((tCon->checkMagicNumber() == 0) && - (tCon->theSendStatus == NdbConnection::sendTC_OP)) { + (tCon->theSendStatus == NdbTransaction::sendTC_OP)) { tReturnCode = tCon->receiveTCINDXCONF(indxConf, tLen); if (tReturnCode != -1) { completedTransaction(tCon); @@ -805,7 +804,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) }//if if(TcIndxConf::getMarkerFlag(indxConf->confInfo)){ - NdbConnection::sendTC_COMMIT_ACK(theCommitAckSignal, + NdbTransaction::sendTC_COMMIT_ACK(theCommitAckSignal, indxConf->transId1, indxConf->transId2, aTCRef); @@ -820,7 +819,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) if (tIndexOp->checkMagicNumber() == 0) { tCon = tIndexOp->theNdbCon; if (tCon != NULL) { - if (tCon->theSendStatus == NdbConnection::sendTC_OP) { + if (tCon->theSendStatus == NdbTransaction::sendTC_OP) { tReturnCode = tIndexOp->receiveTCINDXREF(aSignal); if (tReturnCode != -1) { completedTransaction(tCon); @@ -861,7 +860,7 @@ Ndb::handleReceivedSignal(NdbApiSignal* aSignal, LinearSectionPtr ptr[3]) /***************************************************************************** -void completedTransaction(NdbConnection* aCon); +void completedTransaction(NdbTransaction* aCon); Remark: One transaction has been completed. Remove it from send array and put it into the completed @@ -869,14 +868,14 @@ Remark: One transaction has been completed. up a poller. ******************************************************************************/ void -Ndb::completedTransaction(NdbConnection* aCon) +Ndb::completedTransaction(NdbTransaction* aCon) { Uint32 tTransArrayIndex = aCon->theTransArrayIndex; Uint32 tNoSentTransactions = theNoOfSentTransactions; Uint32 tNoCompletedTransactions = theNoOfCompletedTransactions; - if ((tNoSentTransactions > 0) && (aCon->theListState == NdbConnection::InSendList) && + if ((tNoSentTransactions > 0) && (aCon->theListState == NdbTransaction::InSendList) && (tTransArrayIndex < tNoSentTransactions)) { - NdbConnection* tMoveCon = theSentTransactionsArray[tNoSentTransactions - 1]; + NdbTransaction* tMoveCon = theSentTransactionsArray[tNoSentTransactions - 1]; theCompletedTransactionsArray[tNoCompletedTransactions] = aCon; aCon->theTransArrayIndex = tNoCompletedTransactions; @@ -888,7 +887,7 @@ Ndb::completedTransaction(NdbConnection* aCon) theNoOfCompletedTransactions = tNoCompletedTransactions + 1; theNoOfSentTransactions = tNoSentTransactions - 1; - aCon->theListState = NdbConnection::InCompletedList; + aCon->theListState = NdbTransaction::InCompletedList; aCon->handleExecuteCompletion(); if ((theMinNoOfEventsToWakeUp != 0) && (theNoOfCompletedTransactions >= theMinNoOfEventsToWakeUp)) { @@ -909,12 +908,12 @@ Ndb::completedTransaction(NdbConnection* aCon) }//Ndb::completedTransaction() /***************************************************************************** -void reportCallback(NdbConnection** aCopyArray, Uint32 aNoOfCompletedTrans); +void reportCallback(NdbTransaction** aCopyArray, Uint32 aNoOfCompletedTrans); Remark: Call the callback methods of the completed transactions. ******************************************************************************/ void -Ndb::reportCallback(NdbConnection** aCopyArray, Uint32 aNoOfCompletedTrans) +Ndb::reportCallback(NdbTransaction** aCopyArray, Uint32 aNoOfCompletedTrans) { Uint32 i; if (aNoOfCompletedTrans > 0) { @@ -923,7 +922,7 @@ Ndb::reportCallback(NdbConnection** aCopyArray, Uint32 aNoOfCompletedTrans) NdbAsynchCallback aCallback = aCopyArray[i]->theCallbackFunction; int tResult = 0; if (aCallback != NULL) { - if (aCopyArray[i]->theReturnStatus == NdbConnection::ReturnFailure) { + if (aCopyArray[i]->theReturnStatus == NdbTransaction::ReturnFailure) { tResult = -1; }//if (*aCallback)(tResult, aCopyArray[i], anyObject); @@ -933,13 +932,13 @@ Ndb::reportCallback(NdbConnection** aCopyArray, Uint32 aNoOfCompletedTrans) }//Ndb::reportCallback() /***************************************************************************** -Uint32 pollCompleted(NdbConnection** aCopyArray); +Uint32 pollCompleted(NdbTransaction** aCopyArray); Remark: Transfer the data from the completed transaction to a local array. This support is used by a number of the poll-methods. ******************************************************************************/ Uint32 -Ndb::pollCompleted(NdbConnection** aCopyArray) +Ndb::pollCompleted(NdbTransaction** aCopyArray) { check_send_timeout(); Uint32 i; @@ -947,13 +946,13 @@ Ndb::pollCompleted(NdbConnection** aCopyArray) if (tNoCompletedTransactions > 0) { for (i = 0; i < tNoCompletedTransactions; i++) { aCopyArray[i] = theCompletedTransactionsArray[i]; - if (aCopyArray[i]->theListState != NdbConnection::InCompletedList) { + if (aCopyArray[i]->theListState != NdbTransaction::InCompletedList) { ndbout << "pollCompleted error "; ndbout << (int) aCopyArray[i]->theListState << endl; abort(); }//if theCompletedTransactionsArray[i] = NULL; - aCopyArray[i]->theListState = NdbConnection::NotInList; + aCopyArray[i]->theListState = NdbTransaction::NotInList; }//for }//if theNoOfCompletedTransactions = 0; @@ -968,7 +967,7 @@ Ndb::check_send_timeout() the_last_check_time = current_time; Uint32 no_of_sent = theNoOfSentTransactions; for (Uint32 i = 0; i < no_of_sent; i++) { - NdbConnection* a_con = theSentTransactionsArray[i]; + NdbTransaction* a_con = theSentTransactionsArray[i]; if ((current_time - a_con->theStartTransTime) > WAITFOR_RESPONSE_TIMEOUT) { #ifdef VM_TRACE @@ -979,8 +978,8 @@ Ndb::check_send_timeout() abort(); #endif a_con->setOperationErrorCodeAbort(4012); - a_con->theCommitStatus = NdbConnection::Aborted; - a_con->theCompletionStatus = NdbConnection::CompletedFailure; + a_con->theCommitStatus = NdbTransaction::Aborted; + a_con->theCompletionStatus = NdbTransaction::CompletedFailure; a_con->handleExecuteCompletion(); remove_sent_list(i); insert_completed_list(a_con); @@ -996,7 +995,7 @@ Ndb::remove_sent_list(Uint32 list_index) { Uint32 last_index = theNoOfSentTransactions - 1; if (list_index < last_index) { - NdbConnection* t_con = theSentTransactionsArray[last_index]; + NdbTransaction* t_con = theSentTransactionsArray[last_index]; theSentTransactionsArray[list_index] = t_con; }//if theNoOfSentTransactions = last_index; @@ -1004,23 +1003,23 @@ Ndb::remove_sent_list(Uint32 list_index) } Uint32 -Ndb::insert_completed_list(NdbConnection* a_con) +Ndb::insert_completed_list(NdbTransaction* a_con) { Uint32 no_of_comp = theNoOfCompletedTransactions; theCompletedTransactionsArray[no_of_comp] = a_con; theNoOfCompletedTransactions = no_of_comp + 1; - a_con->theListState = NdbConnection::InCompletedList; + a_con->theListState = NdbTransaction::InCompletedList; a_con->theTransArrayIndex = no_of_comp; return no_of_comp; } Uint32 -Ndb::insert_sent_list(NdbConnection* a_con) +Ndb::insert_sent_list(NdbTransaction* a_con) { Uint32 no_of_sent = theNoOfSentTransactions; theSentTransactionsArray[no_of_sent] = a_con; theNoOfSentTransactions = no_of_sent + 1; - a_con->theListState = NdbConnection::InSendList; + a_con->theListState = NdbTransaction::InSendList; a_con->theTransArrayIndex = no_of_sent; return no_of_sent; } @@ -1052,16 +1051,16 @@ Ndb::sendPrepTrans(int forceSend) TransporterFacade* tp = TransporterFacade::instance(); Uint32 no_of_prep_trans = theNoOfPreparedTransactions; for (i = 0; i < no_of_prep_trans; i++) { - NdbConnection * a_con = thePreparedTransactionsArray[i]; + NdbTransaction * a_con = thePreparedTransactionsArray[i]; thePreparedTransactionsArray[i] = NULL; Uint32 node_id = a_con->getConnectedNodeId(); if ((tp->getNodeSequence(node_id) == a_con->theNodeSequence) && tp->get_node_alive(node_id) || (tp->get_node_stopping(node_id) && - ((a_con->theSendStatus == NdbConnection::sendABORT) || - (a_con->theSendStatus == NdbConnection::sendABORTfail) || - (a_con->theSendStatus == NdbConnection::sendCOMMITstate) || - (a_con->theSendStatus == NdbConnection::sendCompleted)))) { + ((a_con->theSendStatus == NdbTransaction::sendABORT) || + (a_con->theSendStatus == NdbTransaction::sendABORTfail) || + (a_con->theSendStatus == NdbTransaction::sendCOMMITstate) || + (a_con->theSendStatus == NdbTransaction::sendCompleted)))) { /* We will send if 1) Node is alive and sequences are correct OR @@ -1093,13 +1092,13 @@ Ndb::sendPrepTrans(int forceSend) again and will thus set the state to Aborted to avoid a more or less eternal loop of tries. */ - if (a_con->theSendStatus == NdbConnection::sendOperations) { + if (a_con->theSendStatus == NdbTransaction::sendOperations) { a_con->setOperationErrorCodeAbort(4021); - a_con->theCommitStatus = NdbConnection::NeedAbort; + a_con->theCommitStatus = NdbTransaction::NeedAbort; TRACE_DEBUG("Send buffer full and sendOperations"); } else { a_con->setOperationErrorCodeAbort(4026); - a_con->theCommitStatus = NdbConnection::Aborted; + a_con->theCommitStatus = NdbTransaction::Aborted; TRACE_DEBUG("Send buffer full, set state to Aborted"); }//if }//if @@ -1116,7 +1115,7 @@ Ndb::sendPrepTrans(int forceSend) */ TRACE_DEBUG("Abort a transaction when stopping a node"); a_con->setOperationErrorCodeAbort(4023); - a_con->theCommitStatus = NdbConnection::NeedAbort; + a_con->theCommitStatus = NdbTransaction::NeedAbort; } else { /* The node is hard dead and we cannot continue. We will also release @@ -1126,11 +1125,11 @@ Ndb::sendPrepTrans(int forceSend) a_con->setOperationErrorCodeAbort(4025); a_con->theReleaseOnClose = true; a_con->theTransactionIsStarted = false; - a_con->theCommitStatus = NdbConnection::Aborted; + a_con->theCommitStatus = NdbTransaction::Aborted; }//if }//if - a_con->theReturnStatus = NdbConnection::ReturnFailure; - a_con->theCompletionStatus = NdbConnection::CompletedFailure; + a_con->theReturnStatus = NdbTransaction::ReturnFailure; + a_con->theCompletionStatus = NdbTransaction::CompletedFailure; a_con->handleExecuteCompletion(); insert_completed_list(a_con); }//for @@ -1204,7 +1203,7 @@ Remark: First send all prepared operations and then check if there are any int Ndb::sendPollNdb(int aMillisecondNumber, int minNoOfEventsToWakeup, int forceSend) { - NdbConnection* tConArray[1024]; + NdbTransaction* tConArray[1024]; Uint32 tNoCompletedTransactions; //theCurrentConnectCounter = 0; @@ -1237,7 +1236,7 @@ Remark: Check if there are any transactions already completed. Wait for not int Ndb::pollNdb(int aMillisecondNumber, int minNoOfEventsToWakeup) { - NdbConnection* tConArray[1024]; + NdbTransaction* tConArray[1024]; Uint32 tNoCompletedTransactions; //theCurrentConnectCounter = 0; @@ -1344,7 +1343,7 @@ Ndb::sendRecSignal(Uint16 node_id, }//Ndb::sendRecSignal() void -NdbConnection::sendTC_COMMIT_ACK(NdbApiSignal * aSignal, +NdbTransaction::sendTC_COMMIT_ACK(NdbApiSignal * aSignal, Uint32 transId1, Uint32 transId2, Uint32 aTCRef){ #ifdef MARKER_TRACE |