diff --git a/ndb/include/kernel/signaldata/RepImpl.hpp b/ndb/include/kernel/signaldata/RepImpl.hpp index affffe46f9c..0de1389a4a9 100644 --- a/ndb/include/kernel/signaldata/RepImpl.hpp +++ b/ndb/include/kernel/signaldata/RepImpl.hpp @@ -93,7 +93,7 @@ public: Uint32 subscriptionId; Uint32 subscriptionKey; Uint32 senderNodeId; - GrepError::Code err; + GrepError::GE_Code err; }; class RepGetGciReq @@ -151,7 +151,7 @@ public: Uint32 lastPSGCI; Uint32 firstSSGCI; Uint32 lastSSGCI; - GrepError::Code err; + GrepError::GE_Code err; }; class RepGetGciBufferReq { @@ -213,7 +213,7 @@ public: Uint32 lastSSGCI; Uint32 currentGCIBuffer; Uint32 nodeGrp; - GrepError::Code err; + GrepError::GE_Code err; }; class RepInsertGciBufferReq @@ -252,7 +252,7 @@ public: Uint32 nodeGrp; Uint32 tableId; Uint32 force; - GrepError::Code err; + GrepError::GE_Code err; }; class RepInsertGciBufferConf @@ -310,7 +310,7 @@ public: Uint32 lastGCI; Uint32 currentGCI; Uint32 nodeGrp; - GrepError::Code err; + GrepError::GE_Code err; }; class RepClearPSGciBufferConf @@ -367,7 +367,7 @@ public: Uint32 lastGCI; Uint32 currentGCI; Uint32 nodeGrp; - GrepError::Code err; + GrepError::GE_Code err; }; class RepClearSSGciBufferConf diff --git a/ndb/include/mgmapi/mgmapi.h b/ndb/include/mgmapi/mgmapi.h index 582e8f1a3e6..ad98de1e322 100644 --- a/ndb/include/mgmapi/mgmapi.h +++ b/ndb/include/mgmapi/mgmapi.h @@ -49,6 +49,7 @@ * @{ */ +#include #include "mgmapi_config_parameters.h" #ifdef __cplusplus diff --git a/ndb/include/ndbapi/NdbConnection.hpp b/ndb/include/ndbapi/NdbConnection.hpp index 7af5d27b922..5043cb0e26d 100644 --- a/ndb/include/ndbapi/NdbConnection.hpp +++ b/ndb/include/ndbapi/NdbConnection.hpp @@ -50,7 +50,7 @@ enum AbortOption { TryCommit = 0, ///< Missing explanation #endif AbortOnError = 0, ///< Abort transaction on failed operation - IgnoreError = 2 ///< Transaction continues on failed operation + AO_IgnoreError = 2 ///< Transaction continues on failed operation }; typedef AbortOption CommitType; diff --git a/ndb/src/common/util/Properties.cpp b/ndb/src/common/util/Properties.cpp index 4443fd45bba..0edcda0e726 100644 --- a/ndb/src/common/util/Properties.cpp +++ b/ndb/src/common/util/Properties.cpp @@ -881,7 +881,7 @@ PropertiesImpl::unpack(const Uint32 * buf, Uint32 &bufLen, Properties * top, case PropertiesType_Properties: assert(0); } - if(res3 != true){ + if(!res3){ return false; } _items--; diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index 882557daae1..35ea878f94b 100644 --- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -528,7 +528,7 @@ Dbdict::writeTableFile(Signal* signal, Uint32 tableId, Uint32 sz = tabInfoPtr.sz + ZPAGE_HEADER_SIZE; c_writeTableRecord.noOfPages = DIV(sz, ZSIZE_OF_PAGES_IN_WORDS); - c_writeTableRecord.tableWriteState = WriteTableRecord::CALLBACK; + c_writeTableRecord.tableWriteState = WriteTableRecord::TWR_CALLBACK; c_writeTableRecord.m_callback = * callback; c_writeTableRecord.pageId = 0; @@ -647,7 +647,7 @@ void Dbdict::closeWriteTableConf(Signal* signal, case WriteTableRecord::WRITE_RESTART_FROM_OWN : ndbrequire(false); break; - case WriteTableRecord::CALLBACK: + case WriteTableRecord::TWR_CALLBACK: jam(); execute(signal, c_writeTableRecord.m_callback, 0); return; @@ -2381,7 +2381,7 @@ Dbdict::restartCreateTab_readTableConf(Signal* signal, ndbrequire(c_writeTableRecord.tableWriteState == WriteTableRecord::IDLE); c_writeTableRecord.noOfPages = c_readTableRecord.noOfPages; c_writeTableRecord.pageId = c_readTableRecord.pageId; - c_writeTableRecord.tableWriteState = WriteTableRecord::CALLBACK; + c_writeTableRecord.tableWriteState = WriteTableRecord::TWR_CALLBACK; c_writeTableRecord.m_callback.m_callbackData = callbackData; c_writeTableRecord.m_callback.m_callbackFunction = safe_cast(&Dbdict::restartCreateTab_writeTableConf); diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp index 19c03a86e22..5a61c0739a6 100644 --- a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp +++ b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp @@ -639,7 +639,7 @@ private: WRITE_ADD_TABLE_SLAVE = 2, WRITE_RESTART_FROM_MASTER = 3, WRITE_RESTART_FROM_OWN = 4, - CALLBACK = 5 + TWR_CALLBACK = 5 }; TableWriteState tableWriteState; Callback m_callback; diff --git a/ndb/src/kernel/blocks/dbdih/Dbdih.hpp b/ndb/src/kernel/blocks/dbdih/Dbdih.hpp index 14fa262f871..66acdf32059 100644 --- a/ndb/src/kernel/blocks/dbdih/Dbdih.hpp +++ b/ndb/src/kernel/blocks/dbdih/Dbdih.hpp @@ -1469,7 +1469,7 @@ private: Uint32 c_blockCommitNo; bool getBlockCommit() const { - return c_blockCommit == true || cgckptflag == true; + return c_blockCommit || cgckptflag; } /** diff --git a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp index d8b3ee10532..e7aec9e670c 100644 --- a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp +++ b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp @@ -6366,7 +6366,7 @@ void Dbtc::sendAbortedAfterTimeout(Signal* signal, int Tcheck) *------------------------------------------------------------------*/ char buf[96]; buf[0] = 0; char buf2[96]; - snprintf(buf, sizeof(buf), "TC %d: %d ops:", + BaseString::snprintf(buf, sizeof(buf), "TC %d: %d ops:", __LINE__, apiConnectptr.i); for(Uint32 i = 0; igetDataPtr(); Uint32 subData = ref->subscriberData; - GrepError::Code err; + GrepError::GE_Code err; Uint32 sendersBlockRef = signal->getSendersBlockRef(); if(sendersBlockRef == SUMA_REF) @@ -624,7 +624,7 @@ Grep::PSCoord::execCREATE_SUBID_REF(Signal* signal) { ndbrequire(false); /* Added since errorcode err unhandled * TODO: fix correct errorcode */ - err= GrepError::NO_ERROR; // remove compiler warning + err= GrepError::GE_NO_ERROR; // remove compiler warning } SubCoordinatorPtr subPtr; @@ -824,7 +824,7 @@ Grep::PSPart::execSUB_CREATE_REF(Signal* signal) jamEntry(); SubCreateRef * const ref = (SubCreateRef *)signal->getDataPtr(); Uint32 subData = ref->subscriberData; - GrepError::Code err = (GrepError::Code)ref->err; + GrepError::GE_Code err = (GrepError::GE_Code)ref->err; SubscriptionPtr subPtr; c_subscriptions.getPtr(subPtr, subData); sendRefToPSCoord(signal, *subPtr.p, err /*error*/); @@ -867,7 +867,7 @@ Grep::PSCoord::execGREP_CREATE_CONF(Signal* signal) GrepEvent::GrepPS_SubCreateConf, subId, subKey, - (Uint32)GrepError::NO_ERROR); + (Uint32)GrepError::GE_NO_ERROR); c_subCoordinatorPool.release(subPtr); @@ -889,7 +889,7 @@ Grep::PSCoord::execGREP_CREATE_REF(Signal* signal) SubCoordinatorPtr subPtr; c_runningSubscriptions.getPtr(subPtr, subData); - sendRefToSS(signal, *subPtr.p, (GrepError::Code)err /*error*/); + sendRefToSS(signal, *subPtr.p, (GrepError::GE_Code)err /*error*/); } @@ -1046,7 +1046,7 @@ Grep::PSPart::execSUB_START_REF(Signal* signal) { SubStartRef * const ref = (SubStartRef *)signal->getDataPtr(); Uint32 subData = ref->subscriberData; - GrepError::Code err = (GrepError::Code)ref->err; + GrepError::GE_Code err = (GrepError::GE_Code)ref->err; SubscriptionData::Part part = (SubscriptionData::Part)ref->part; SubscriptionPtr subPtr; c_subscriptions.getPtr(subPtr, subData); @@ -1102,7 +1102,7 @@ Grep::PSCoord::execGREP_START_CONF(Signal* signal) EventReport::GrepSubscriptionInfo, GrepEvent::GrepPS_SubStartMetaConf, subId, subKey, - (Uint32)GrepError::NO_ERROR); + (Uint32)GrepError::GE_NO_ERROR); c_subCoordinatorPool.release(subPtr); break; @@ -1118,7 +1118,7 @@ Grep::PSCoord::execGREP_START_CONF(Signal* signal) EventReport::GrepSubscriptionInfo, GrepEvent::GrepPS_SubStartDataConf, subId, subKey, - (Uint32)GrepError::NO_ERROR); + (Uint32)GrepError::GE_NO_ERROR); c_subCoordinatorPool.release(subPtr); @@ -1145,7 +1145,7 @@ Grep::PSCoord::execGREP_START_REF(Signal* signal) jamEntry(); GrepStartRef * const ref = (GrepStartRef *)signal->getDataPtr(); Uint32 subData = ref->senderData; - GrepError::Code err = (GrepError::Code)ref->err; + GrepError::GE_Code err = (GrepError::GE_Code)ref->err; SubscriptionData::Part part = (SubscriptionData::Part)ref->part; SubCoordinatorPtr subPtr; @@ -1301,7 +1301,7 @@ Grep::PSPart::execSUB_REMOVE_REF(Signal* signal) jamEntry(); SubRemoveRef * const ref = (SubRemoveRef *)signal->getDataPtr(); Uint32 subData = ref->subscriberData; - /* GrepError::Code err = (GrepError::Code)ref->err;*/ + /* GrepError::GE_Code err = (GrepError::GE_Code)ref->err;*/ SubscriptionPtr subPtr; c_subscriptions.getPtr(subPtr, subData); @@ -1342,7 +1342,7 @@ Grep::PSCoord::execGREP_REMOVE_CONF(Signal* signal) EventReport::GrepSubscriptionInfo, GrepEvent::GrepPS_SubRemoveConf, subId, subKey, - GrepError::NO_ERROR); + GrepError::GE_NO_ERROR); GrepSubRemoveConf * grepConf = (GrepSubRemoveConf *) conf; grepConf->subscriptionId = subId; @@ -1375,7 +1375,7 @@ Grep::PSCoord::execGREP_REMOVE_REF(Signal* signal) subPtr.p = c_runningSubscriptions.getPtr(subPtr.i); if(subData == subPtr.i) { - sendRefToSS(signal, *subPtr.p, (GrepError::Code)err /*error*/); + sendRefToSS(signal, *subPtr.p, (GrepError::GE_Code)err /*error*/); c_runningSubscriptions.release(subPtr); return; } @@ -1633,7 +1633,7 @@ Grep::PSPart::execSUB_SYNC_REF(Signal* signal) { jamEntry(); SubSyncRef * const ref = (SubSyncRef *)signal->getDataPtr(); Uint32 subData = ref->subscriberData; - GrepError::Code err = (GrepError::Code)ref->err; + GrepError::GE_Code err = (GrepError::GE_Code)ref->err; SubscriptionData::Part part = (SubscriptionData::Part)ref->part; SubscriptionPtr subPtr; @@ -1677,7 +1677,7 @@ Grep::PSCoord::execGREP_SYNC_CONF(Signal* signal) /* @todo Johan: Add firstGCI here. /Lars */ m_grep->sendEventRep(signal, EventReport::GrepSubscriptionInfo, event, subId, subKey, - (Uint32)GrepError::NO_ERROR, + (Uint32)GrepError::GE_NO_ERROR, lastGCI); /************************* @@ -1707,7 +1707,7 @@ Grep::PSCoord::execGREP_SYNC_REF(Signal* signal) { GrepSyncRef * const ref = (GrepSyncRef *)signal->getDataPtr(); Uint32 subData = ref->senderData; SubscriptionData::Part part = (SubscriptionData::Part)ref->part; - GrepError::Code err = (GrepError::Code)ref->err; + GrepError::GE_Code err = (GrepError::GE_Code)ref->err; SubCoordinatorPtr subPtr; c_runningSubscriptions.getPtr(subPtr, subData); sendRefToSS(signal, *subPtr.p, err /*error*/, part); @@ -1718,7 +1718,7 @@ Grep::PSCoord::execGREP_SYNC_REF(Signal* signal) { void Grep::PSCoord::sendRefToSS(Signal * signal, SubCoordinator sub, - GrepError::Code err, + GrepError::GE_Code err, SubscriptionData::Part part) { /** @@ -1843,7 +1843,7 @@ Grep::PSCoord::sendRefToSS(Signal * signal, void Grep::PSPart::sendRefToPSCoord(Signal * signal, Subscription sub, - GrepError::Code err, + GrepError::GE_Code err, SubscriptionData::Part part) { jam(); diff --git a/ndb/src/mgmsrv/Config.cpp b/ndb/src/mgmsrv/Config.cpp index f9c6a23f909..5ff9cbe04ad 100644 --- a/ndb/src/mgmsrv/Config.cpp +++ b/ndb/src/mgmsrv/Config.cpp @@ -53,27 +53,27 @@ Config::printAllNameValuePairs(NdbOut &out, if(!section->contains(n)) continue; - if (m_info.getStatus(section, n) == ConfigInfo::INTERNAL) + if (m_info.getStatus(section, n) == ConfigInfo::CI_INTERNAL) continue; - if (m_info.getStatus(section, n) == ConfigInfo::DEPRICATED) + if (m_info.getStatus(section, n) == ConfigInfo::CI_DEPRICATED) continue; - if (m_info.getStatus(section, n) == ConfigInfo::NOTIMPLEMENTED) + if (m_info.getStatus(section, n) == ConfigInfo::CI_NOTIMPLEMENTED) continue; out << n << ": "; switch (m_info.getType(section, n)) { - case ConfigInfo::INT: + case ConfigInfo::CI_INT: MGM_REQUIRE(prop->get(n, &int_value)); out << int_value; break; - case ConfigInfo::INT64: + case ConfigInfo::CI_INT64: MGM_REQUIRE(prop->get(n, &int_64)); out << int_64; break; - case ConfigInfo::BOOL: + case ConfigInfo::CI_BOOL: MGM_REQUIRE(prop->get(n, &int_value)); if (int_value) { out << "Y"; @@ -81,11 +81,11 @@ Config::printAllNameValuePairs(NdbOut &out, out << "N"; } break; - case ConfigInfo::STRING: + case ConfigInfo::CI_STRING: MGM_REQUIRE(prop->get(n, &str_value)); out << str_value; break; - case ConfigInfo::SECTION: + case ConfigInfo::CI_SECTION: out << "SECTION"; break; } diff --git a/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp index 5f1f0cccb23..0a41db0e044 100644 --- a/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/ndb/src/mgmsrv/ConfigInfo.cpp @@ -2272,12 +2272,12 @@ ConfigInfo::ConfigInfo() * Getters ****************************************************************************/ inline void warning(const char * src, const char * arg){ - ndbout << "Illegal call to ConfigInfo::CI_" << src << "() - " << arg << endl; + ndbout << "Illegal call to ConfigInfo::" << src << "() - " << arg << endl; abort(); } const Properties * -ConfigInfo::CI_getInfo(const char * section) const { +ConfigInfo::getInfo(const char * section) const { const Properties * p; if(!m_info.get(section, &p)){ return 0; @@ -2391,23 +2391,23 @@ ConfigInfo::getType(const Properties * section, const char* fname) const { return (ConfigInfo::Type) getInfoInt(section, fname, "Type"); } -ConfigInfo::CI_Status -ConfigInfo::CI_getStatus(const Properties * section, const char* fname) const { - return (ConfigInfo::CI_Status) getInfoInt(section, fname, "Status"); +ConfigInfo::Status +ConfigInfo::getStatus(const Properties * section, const char* fname) const { + return (ConfigInfo::Status) getInfoInt(section, fname, "Status"); } /**************************************************************************** * Printers ****************************************************************************/ -void ConfigInfo::CI_print() const { +void ConfigInfo::print() const { Properties::Iterator it(&m_info); for (const char* n = it.first(); n != NULL; n = it.next()) { print(n); } } -void ConfigInfo::CI_print(const char* section) const { +void ConfigInfo::print(const char* section) const { ndbout << "****** " << section << " ******" << endl << endl; const Properties * sec = getInfo(section); Properties::Iterator it(sec); @@ -2420,7 +2420,7 @@ void ConfigInfo::CI_print(const char* section) const { } } -void ConfigInfo::CI_print(const Properties * section, +void ConfigInfo::print(const Properties * section, const char* parameter) const { ndbout << parameter; // ndbout << getDescription(section, parameter) << endl; @@ -2743,7 +2743,7 @@ applyDefaultValues(InitConfigFileParser::Context & ctx, Properties::Iterator it(defaults); for(const char * name = it.first(); name != NULL; name = it.next()){ - ConfigInfo::CI_Status st = ctx.m_info->getStatus(ctx.m_currentInfo, name); + ConfigInfo::Status st = ctx.m_info->getStatus(ctx.m_currentInfo, name); if(!ctx.m_currentSection->contains(name)){ switch (ctx.m_info->getType(ctx.m_currentInfo, name)){ case ConfigInfo::CI_INT: @@ -3163,7 +3163,7 @@ transform(InitConfigFileParser::Context & ctx, PropertiesType oldType; require(ctx.m_currentSection->getTypeOf(oldName, &oldType)); - ConfigInfo::CI_Type newType = ctx.m_info->getType(ctx.m_currentInfo, newName); + ConfigInfo::Type newType = ctx.m_info->getType(ctx.m_currentInfo, newName); if(!((oldType == PropertiesType_Uint32 || oldType == PropertiesType_Uint64) && (newType == ConfigInfo::CI_INT || newType == ConfigInfo::CI_INT64 || newType == ConfigInfo::CI_BOOL))){ ndbout << "oldType: " << (int)oldType << ", newType: " << (int)newType << endl; @@ -3326,7 +3326,7 @@ saveInConfigValues(InitConfigFileParser::Context & ctx, const char * data){ } static bool -sanity_checks(Vector§ions, +sanity_checks(Vector§ions, struct InitConfigFileParser::Context &ctx, const char * rule_data) { @@ -3349,7 +3349,7 @@ sanity_checks(Vector§ions, } static bool -add_node_connections(Vector§ions, +add_node_connections(Vector§ions, struct InitConfigFileParser::Context &ctx, const char * rule_data) { @@ -3401,7 +3401,7 @@ add_node_connections(Vector§ions, for (Uint32 j= i+1;; j++){ if(!p_db_nodes.get("", j, &nodeId2)) break; if(!p_connections2.get("", nodeId1+nodeId2<<16, &dummy)) { - ConfigInfo::CI_ConfigRuleSection s; + ConfigInfo::ConfigRuleSection s; s.m_sectionType= BaseString("TCP"); s.m_sectionData= new Properties(true); char buf[16]; @@ -3418,7 +3418,7 @@ add_node_connections(Vector§ions, if(!p_connections.get("", nodeId1, &dummy)) { for (Uint32 j= 0;; j++){ if(!p_db_nodes.get("", j, &nodeId2)) break; - ConfigInfo::CI_ConfigRuleSection s; + ConfigInfo::ConfigRuleSection s; s.m_sectionType= BaseString("TCP"); s.m_sectionData= new Properties(true); char buf[16]; @@ -3435,7 +3435,7 @@ add_node_connections(Vector§ions, } -static bool add_server_ports(Vector§ions, +static bool add_server_ports(Vector§ions, struct InitConfigFileParser::Context &ctx, const char * rule_data) { @@ -3475,7 +3475,7 @@ static bool add_server_ports(Vector§ions, } static bool -check_node_vs_replicas(Vector§ions, +check_node_vs_replicas(Vector§ions, struct InitConfigFileParser::Context &ctx, const char * rule_data) { @@ -3602,4 +3602,4 @@ check_node_vs_replicas(Vector§ions, return true; } -template class Vector; +template class Vector; diff --git a/ndb/src/mgmsrv/InitConfigFileParser.cpp b/ndb/src/mgmsrv/InitConfigFileParser.cpp index fdfe7823fc2..bf74f220b58 100644 --- a/ndb/src/mgmsrv/InitConfigFileParser.cpp +++ b/ndb/src/mgmsrv/InitConfigFileParser.cpp @@ -260,10 +260,10 @@ bool InitConfigFileParser::parseNameValuePair(Context& ctx, const char* line) { return false; } ConfigInfo::Status status = m_info->getStatus(ctx.m_currentInfo, fname); - if (status == ConfigInfo::NOTIMPLEMENTED) { + if (status == ConfigInfo::CI_NOTIMPLEMENTED) { ctx.reportWarning("[%s] %s not yet implemented", ctx.fname, fname); } - if (status == ConfigInfo::DEPRICATED) { + if (status == ConfigInfo::CI_DEPRICATED) { const char * desc = m_info->getDescription(ctx.m_currentInfo, fname); if(desc){ ctx.reportWarning("[%s] %s is depricated, use %s instead", @@ -316,7 +316,7 @@ InitConfigFileParser::storeNameValuePair(Context& ctx, const ConfigInfo::Type type = m_info->getType(ctx.m_currentInfo, fname); switch(type){ - case ConfigInfo::BOOL: { + case ConfigInfo::CI_BOOL: { bool value_bool; if (!convertStringToBool(value, value_bool)) { ctx.reportError("Illegal boolean value for parameter %s", fname); @@ -325,8 +325,8 @@ InitConfigFileParser::storeNameValuePair(Context& ctx, MGM_REQUIRE(ctx.m_currentSection->put(pname, value_bool)); break; } - case ConfigInfo::INT: - case ConfigInfo::INT64:{ + case ConfigInfo::CI_INT: + case ConfigInfo::CI_INT64:{ Uint64 value_int; if (!convertStringToUint64(value, value_int)) { ctx.reportError("Illegal integer value for parameter %s", fname); @@ -339,17 +339,17 @@ InitConfigFileParser::storeNameValuePair(Context& ctx, m_info->getMax(ctx.m_currentInfo, fname)); return false; } - if(type == ConfigInfo::INT){ + if(type == ConfigInfo::CI_INT){ MGM_REQUIRE(ctx.m_currentSection->put(pname, (Uint32)value_int)); } else { MGM_REQUIRE(ctx.m_currentSection->put64(pname, value_int)); } break; } - case ConfigInfo::STRING: + case ConfigInfo::CI_STRING: MGM_REQUIRE(ctx.m_currentSection->put(pname, value)); break; - case ConfigInfo::SECTION: + case ConfigInfo::CI_SECTION: abort(); } return true; diff --git a/ndb/src/ndbapi/NdbBlob.cpp b/ndb/src/ndbapi/NdbBlob.cpp index 53c0a0e07f9..da0a4f73c3e 100644 --- a/ndb/src/ndbapi/NdbBlob.cpp +++ b/ndb/src/ndbapi/NdbBlob.cpp @@ -975,7 +975,7 @@ NdbBlob::deletePartsUnknown(Uint32 part) setErrorCode(tOp); return -1; } - tOp->m_abortOption = IgnoreError; + tOp->m_abortOption = AO_IgnoreError; n++; } DBG("deletePartsUnknown: executeNoBlobs [in] bat=" << bat); @@ -1223,7 +1223,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch) return -1; } if (isWriteOp()) { - tOp->m_abortOption = IgnoreError; + tOp->m_abortOption = AO_IgnoreError; } theHeadInlineReadOp = tOp; // execute immediately @@ -1269,7 +1269,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch) return -1; } if (isWriteOp()) { - tOp->m_abortOption = IgnoreError; + tOp->m_abortOption = AO_IgnoreError; } theHeadInlineReadOp = tOp; // execute immediately diff --git a/ndb/src/ndbapi/NdbConnection.cpp b/ndb/src/ndbapi/NdbConnection.cpp index 4f6468eb4ae..7710a3354d3 100644 --- a/ndb/src/ndbapi/NdbConnection.cpp +++ b/ndb/src/ndbapi/NdbConnection.cpp @@ -1578,7 +1578,7 @@ from other transactions. (theLastExecOpInList->theCommitIndicator == 1)){ - if (m_abortOption == IgnoreError && theError.code != 0){ + if (m_abortOption == AO_IgnoreError && theError.code != 0){ /** * There's always a TCKEYCONF when using IgnoreError */ @@ -1832,7 +1832,7 @@ NdbConnection::OpCompleteFailure(Uint8 abortOption, bool setFailure) //decide the success of the whole transaction since a simple //operation is not really part of that transaction. //------------------------------------------------------------------------ - if (abortOption == IgnoreError){ + if (abortOption == AO_IgnoreError){ /** * There's always a TCKEYCONF when using IgnoreError */ diff --git a/ndb/src/ndbapi/NdbImpl.hpp b/ndb/src/ndbapi/NdbImpl.hpp index 04446491cb6..baac0ee2846 100644 --- a/ndb/src/ndbapi/NdbImpl.hpp +++ b/ndb/src/ndbapi/NdbImpl.hpp @@ -146,7 +146,7 @@ NdbWaiter::wait(int waitTime) NdbCondition_Wait(m_condition, (NdbMutex*)m_mutex); } else { if (waitTime <= 0) { - m_state = WAIT_TIMEOUT; + m_state = WST_WAIT_TIMEOUT; break; } NdbCondition_WaitTimeout(m_condition, (NdbMutex*)m_mutex, waitTime); diff --git a/ndb/src/ndbapi/NdbOperationExec.cpp b/ndb/src/ndbapi/NdbOperationExec.cpp index cccc3b6409f..afa3609e11c 100644 --- a/ndb/src/ndbapi/NdbOperationExec.cpp +++ b/ndb/src/ndbapi/NdbOperationExec.cpp @@ -199,7 +199,7 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId) tcKeyReq->setKeyLength(tReqInfo, tTupKeyLen); // A simple read is always ignore error - abortOption = tSimpleIndicator ? IgnoreError : abortOption; + abortOption = tSimpleIndicator ? AO_IgnoreError : abortOption; tcKeyReq->setAbortOption(tReqInfo, abortOption); Uint8 tDistrKeyIndicator = theDistrKeyIndicator; @@ -548,14 +548,14 @@ NdbOperation::receiveTCKEYREF( NdbApiSignal* aSignal) theStatus = Finished; // blobs want this - if (m_abortOption != IgnoreError) + if (m_abortOption != AO_IgnoreError) theNdbCon->theReturnStatus = NdbConnection::ReturnFailure; theError.code = aSignal->readData(4); theNdbCon->setOperationErrorCodeAbort(aSignal->readData(4), m_abortOption); if(theOperationType != ReadRequest || !theSimpleIndicator) // not simple read - return theNdbCon->OpCompleteFailure(ao, m_abortOption != IgnoreError); + return theNdbCon->OpCompleteFailure(ao, m_abortOption != AO_IgnoreError); /** * If TCKEYCONF has arrived diff --git a/ndb/test/ndbapi/testOperations.cpp b/ndb/test/ndbapi/testOperations.cpp index f31906dd737..949f08281a5 100644 --- a/ndb/test/ndbapi/testOperations.cpp +++ b/ndb/test/ndbapi/testOperations.cpp @@ -171,7 +171,7 @@ runTwoOperations(NDBT_Context* ctx, NDBT_Step* step){ // Insert, read CHECK(hugoOps.startTransaction(pNdb) == 0); CHECK(runOp(hugoOps, pNdb, op1, val1) == 0); - AbortOption oa = (res1 == 0) ? AbortOnError : IgnoreError; + AbortOption oa = (res1 == 0) ? AbortOnError : AO_IgnoreError; CHECK(hugoOps.execute_NoCommit(pNdb, oa) == res1); CHECK(checkVal(hugoOps, op1, val1, res1) == 0); diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 0d2b1676e3a..ba59772ca9b 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -183,7 +183,7 @@ int execute_no_commit_ie(ha_ndbcluster *h, NdbConnection *trans) if (m_batch_execute) return 0; #endif - return trans->execute(NoCommit,IgnoreError,1); + return trans->execute(NoCommit, AO_IgnoreError,1); } /*