Loading ndb/include/ndbapi/NdbBlob.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -309,8 +309,8 @@ private: int invokeActiveHook(); // blob handle maintenance int atPrepare(NdbTransaction* aCon, NdbOperation* anOp, const NdbColumnImpl* aColumn); int preExecute(ExecType anExecType, bool& batch); int postExecute(ExecType anExecType); int preExecute(NdbTransaction::ExecType anExecType, bool& batch); int postExecute(NdbTransaction::ExecType anExecType); int preCommit(); int atNextResult(); // errors Loading ndb/include/ndbapi/NdbOperation.hpp +10 −3 Original line number Diff line number Diff line Loading @@ -59,10 +59,17 @@ public: */ enum LockMode { LM_Read = 0, LM_Exclusive = 1, LM_CommittedRead = 2, LM_Read ///< Read with shared lock #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL = 0 #endif ,LM_Exclusive ///< Read with exclusive lock #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL = 1 #endif ,LM_CommittedRead ///< Ignore locks, read last committed value #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL = 2, LM_Dirty = 2 #endif }; Loading ndb/include/ndbapi/NdbTransaction.hpp +80 −31 Original line number Diff line number Diff line Loading @@ -42,34 +42,22 @@ class NdbBlob; typedef void (* NdbAsynchCallback)(int, NdbTransaction*, void*); #endif /** * Commit type of transaction */ #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED enum AbortOption { #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL CommitIfFailFree= 0, CommitAsMuchAsPossible = 2, ///< Commit transaction with as many TryCommit = 0, ///< <i>Missing explanation</i> #endif AbortOnError = 0, ///< Abort transaction on failed operation AO_IgnoreError = 2 ///< Transaction continues on failed operation TryCommit= 0, AbortOnError= 0, CommitAsMuchAsPossible= 2, AO_IgnoreError= 2 }; typedef AbortOption CommitType; /** * Execution type of transaction */ enum ExecType { NoExecTypeDef = -1, ///< Erroneous type (Used for debugging only) Prepare, ///< <i>Missing explanation</i> NoCommit, ///< Execute the transaction as far as it has ///< been defined, but do not yet commit it Commit, ///< Execute and try to commit the transaction Rollback ///< Rollback transaction NoExecTypeDef = -1, Prepare, NoCommit, Commit, Rollback }; #endif /** * @class NdbTransaction Loading Loading @@ -99,17 +87,17 @@ enum ExecType { * before calling execute(). * * A call to execute() uses one out of three types of execution: * -# ExecType::NoCommit Executes operations without committing them. * -# ExecType::Commit Executes remaining operation and commits the * -# NdbTransaction::NoCommit Executes operations without committing them. * -# NdbTransaction::Commit Executes remaining operation and commits the * complete transaction * -# ExecType::Rollback Rollbacks the entire transaction. * -# NdbTransaction::Rollback Rollbacks the entire transaction. * * execute() is equipped with an extra error handling parameter. * There are two alternatives: * -# AbortOption::AbortOnError (default). * -# NdbTransaction::AbortOnError (default). * The transaction is aborted if there are any error during the * execution * -# AbortOption::IgnoreError * -# NdbTransaction::AO_IgnoreError * Continue execution of transaction even if operation fails * */ Loading Loading @@ -141,6 +129,7 @@ enum ExecType { * primary key since it came along from the scanned tuple. * */ class NdbTransaction { #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL Loading @@ -154,6 +143,44 @@ class NdbTransaction public: /** * Commit type of transaction */ enum AbortOption { AbortOnError= ///< Abort transaction on failed operation #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL ::AbortOnError #endif ,AO_IgnoreError= ///< Transaction continues on failed operation #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL ::AO_IgnoreError #endif }; /** * Execution type of transaction */ enum ExecType { #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL NoExecTypeDef= ::NoExecTypeDef, ///< Erroneous type (Used for debugging only) Prepare= ::Prepare, ///< <i>Missing explanation</i> #endif NoCommit= ///< Execute the transaction as far as it has ///< been defined, but do not yet commit it #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL ::NoCommit #endif ,Commit= ///< Execute and try to commit the transaction #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL ::Commit #endif ,Rollback ///< Rollback transaction #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL = ::Rollback #endif }; /** * Get an NdbOperation for a table. * Note that the operation has to be defined before it is executed. Loading Loading @@ -284,6 +311,12 @@ public: int execute(ExecType execType, AbortOption abortOption = AbortOnError, int force = 0 ); #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED int execute(::ExecType execType, ::AbortOption abortOption = ::AbortOnError, int force = 0 ) { return execute ((ExecType)execType,(AbortOption)abortOption,force); } #endif #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL // to be documented later Loading Loading @@ -314,6 +347,14 @@ public: NdbAsynchCallback callback, void* anyObject, AbortOption abortOption = AbortOnError); #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED void executeAsynchPrepare(::ExecType execType, NdbAsynchCallback callback, void* anyObject, ::AbortOption abortOption = ::AbortOnError) { executeAsynchPrepare((ExecType)execType, callback, anyObject, (AbortOption)abortOption); } #endif /** * Prepare and send an asynchronous transaction. Loading @@ -332,6 +373,14 @@ public: NdbAsynchCallback aCallback, void* anyObject, AbortOption abortOption = AbortOnError); #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED void executeAsynch(::ExecType aTypeOfExec, NdbAsynchCallback aCallback, void* anyObject, ::AbortOption abortOption= ::AbortOnError) { executeAsynch((ExecType)aTypeOfExec, aCallback, anyObject, (AbortOption)abortOption); } #endif #endif /** * Refresh Loading ndb/src/ndbapi/NdbBlob.cpp +23 −22 Original line number Diff line number Diff line Loading @@ -875,7 +875,7 @@ NdbBlob::readParts(char* buf, Uint32 part, Uint32 count) setErrorCode(tOp); return -1; } tOp->m_abortOption = AbortOnError; tOp->m_abortOption = NdbTransaction::AbortOnError; buf += thePartSize; n++; thePendingBlobOps |= (1 << NdbOperation::ReadRequest); Loading @@ -898,7 +898,7 @@ NdbBlob::insertParts(const char* buf, Uint32 part, Uint32 count) setErrorCode(tOp); return -1; } tOp->m_abortOption = AbortOnError; tOp->m_abortOption = NdbTransaction::AbortOnError; buf += thePartSize; n++; thePendingBlobOps |= (1 << NdbOperation::InsertRequest); Loading @@ -921,7 +921,7 @@ NdbBlob::updateParts(const char* buf, Uint32 part, Uint32 count) setErrorCode(tOp); return -1; } tOp->m_abortOption = AbortOnError; tOp->m_abortOption = NdbTransaction::AbortOnError; buf += thePartSize; n++; thePendingBlobOps |= (1 << NdbOperation::UpdateRequest); Loading @@ -943,7 +943,7 @@ NdbBlob::deleteParts(Uint32 part, Uint32 count) setErrorCode(tOp); return -1; } tOp->m_abortOption = AbortOnError; tOp->m_abortOption = NdbTransaction::AbortOnError; n++; thePendingBlobOps |= (1 << NdbOperation::DeleteRequest); theNdbCon->thePendingBlobOps |= (1 << NdbOperation::DeleteRequest); Loading Loading @@ -976,11 +976,11 @@ NdbBlob::deletePartsUnknown(Uint32 part) setErrorCode(tOp); return -1; } tOp->m_abortOption = AO_IgnoreError; tOp->m_abortOption= NdbTransaction::AO_IgnoreError; n++; } DBG("deletePartsUnknown: executeNoBlobs [in] bat=" << bat); if (theNdbCon->executeNoBlobs(NoCommit) == -1) if (theNdbCon->executeNoBlobs(NdbTransaction::NoCommit) == -1) return -1; DBG("deletePartsUnknown: executeNoBlobs [out]"); n = 0; Loading Loading @@ -1012,7 +1012,7 @@ NdbBlob::executePendingBlobReads() Uint8 flags = (1 << NdbOperation::ReadRequest); if (thePendingBlobOps & flags) { DBG("executePendingBlobReads: executeNoBlobs [in]"); if (theNdbCon->executeNoBlobs(NoCommit) == -1) if (theNdbCon->executeNoBlobs(NdbTransaction::NoCommit) == -1) return -1; DBG("executePendingBlobReads: executeNoBlobs [out]"); thePendingBlobOps = 0; Loading @@ -1027,7 +1027,7 @@ NdbBlob::executePendingBlobWrites() Uint8 flags = 0xFF & ~(1 << NdbOperation::ReadRequest); if (thePendingBlobOps & flags) { DBG("executePendingBlobWrites: executeNoBlobs [in]"); if (theNdbCon->executeNoBlobs(NoCommit) == -1) if (theNdbCon->executeNoBlobs(NdbTransaction::NoCommit) == -1) return -1; DBG("executePendingBlobWrites: executeNoBlobs [out]"); thePendingBlobOps = 0; Loading Loading @@ -1175,7 +1175,7 @@ NdbBlob::atPrepare(NdbTransaction* aCon, NdbOperation* anOp, const NdbColumnImpl * back after postExecute. */ int NdbBlob::preExecute(ExecType anExecType, bool& batch) NdbBlob::preExecute(NdbTransaction::ExecType anExecType, bool& batch) { DBG("preExecute [in]"); if (theState == Invalid) Loading Loading @@ -1224,7 +1224,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch) return -1; } if (isWriteOp()) { tOp->m_abortOption = AO_IgnoreError; tOp->m_abortOption = NdbTransaction::AO_IgnoreError; } theHeadInlineReadOp = tOp; // execute immediately Loading Loading @@ -1270,7 +1270,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch) return -1; } if (isWriteOp()) { tOp->m_abortOption = AO_IgnoreError; tOp->m_abortOption = NdbTransaction::AO_IgnoreError; } theHeadInlineReadOp = tOp; // execute immediately Loading Loading @@ -1316,18 +1316,18 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch) * any remaining prepared operations. */ int NdbBlob::postExecute(ExecType anExecType) NdbBlob::postExecute(NdbTransaction::ExecType anExecType) { DBG("postExecute [in] type=" << anExecType); if (theState == Invalid) return -1; if (theState == Active) { setState(anExecType == NoCommit ? Active : Closed); setState(anExecType == NdbTransaction::NoCommit ? Active : Closed); DBG("postExecute [skip]"); return 0; } assert(theState == Prepared); setState(anExecType == NoCommit ? Active : Closed); setState(anExecType == NdbTransaction::NoCommit ? Active : Closed); assert(isKeyOp()); if (isIndexOp()) { NdbBlob* tFirstBlob = theNdbOp->theBlobList; Loading @@ -1343,14 +1343,15 @@ NdbBlob::postExecute(ExecType anExecType) return -1; if (theGetFlag) { assert(theGetSetBytes == 0 || theGetBuf != 0); assert(theGetSetBytes <= theInlineSize || anExecType == NoCommit); assert(theGetSetBytes <= theInlineSize || anExecType == NdbTransaction::NoCommit); Uint32 bytes = theGetSetBytes; if (readDataPrivate(theGetBuf, bytes) == -1) return -1; } } if (isUpdateOp()) { assert(anExecType == NoCommit); assert(anExecType == NdbTransaction::NoCommit); getHeadFromRecAttr(); if (theSetFlag) { // setValue overwrites everything Loading @@ -1367,7 +1368,7 @@ NdbBlob::postExecute(ExecType anExecType) } } if (isWriteOp() && isTableOp()) { assert(anExecType == NoCommit); assert(anExecType == NdbTransaction::NoCommit); if (theHeadInlineReadOp->theError.code == 0) { int tNullFlag = theNullFlag; Uint64 tLength = theLength; Loading Loading @@ -1418,18 +1419,18 @@ NdbBlob::postExecute(ExecType anExecType) } } if (isDeleteOp()) { assert(anExecType == NoCommit); assert(anExecType == NdbTransaction::NoCommit); getHeadFromRecAttr(); if (deleteParts(0, getPartCount()) == -1) return -1; } setState(anExecType == NoCommit ? Active : Closed); setState(anExecType == NdbTransaction::NoCommit ? Active : Closed); // activation callback if (theActiveHook != NULL) { if (invokeActiveHook() == -1) return -1; } if (anExecType == NoCommit && theHeadInlineUpdateFlag) { if (anExecType == NdbTransaction::NoCommit && theHeadInlineUpdateFlag) { NdbOperation* tOp = theNdbCon->getNdbOperation(theTable); if (tOp == NULL || tOp->updateTuple() == -1 || Loading @@ -1438,7 +1439,7 @@ NdbBlob::postExecute(ExecType anExecType) setErrorCode(NdbBlobImpl::ErrAbort); return -1; } tOp->m_abortOption = AbortOnError; tOp->m_abortOption = NdbTransaction::AbortOnError; DBG("added op to update head+inline"); } DBG("postExecute [out]"); Loading Loading @@ -1468,7 +1469,7 @@ NdbBlob::preCommit() setErrorCode(NdbBlobImpl::ErrAbort); return -1; } tOp->m_abortOption = AbortOnError; tOp->m_abortOption = NdbTransaction::AbortOnError; DBG("added op to update head+inline"); } } Loading Loading
ndb/include/ndbapi/NdbBlob.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -309,8 +309,8 @@ private: int invokeActiveHook(); // blob handle maintenance int atPrepare(NdbTransaction* aCon, NdbOperation* anOp, const NdbColumnImpl* aColumn); int preExecute(ExecType anExecType, bool& batch); int postExecute(ExecType anExecType); int preExecute(NdbTransaction::ExecType anExecType, bool& batch); int postExecute(NdbTransaction::ExecType anExecType); int preCommit(); int atNextResult(); // errors Loading
ndb/include/ndbapi/NdbOperation.hpp +10 −3 Original line number Diff line number Diff line Loading @@ -59,10 +59,17 @@ public: */ enum LockMode { LM_Read = 0, LM_Exclusive = 1, LM_CommittedRead = 2, LM_Read ///< Read with shared lock #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL = 0 #endif ,LM_Exclusive ///< Read with exclusive lock #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL = 1 #endif ,LM_CommittedRead ///< Ignore locks, read last committed value #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL = 2, LM_Dirty = 2 #endif }; Loading
ndb/include/ndbapi/NdbTransaction.hpp +80 −31 Original line number Diff line number Diff line Loading @@ -42,34 +42,22 @@ class NdbBlob; typedef void (* NdbAsynchCallback)(int, NdbTransaction*, void*); #endif /** * Commit type of transaction */ #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED enum AbortOption { #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL CommitIfFailFree= 0, CommitAsMuchAsPossible = 2, ///< Commit transaction with as many TryCommit = 0, ///< <i>Missing explanation</i> #endif AbortOnError = 0, ///< Abort transaction on failed operation AO_IgnoreError = 2 ///< Transaction continues on failed operation TryCommit= 0, AbortOnError= 0, CommitAsMuchAsPossible= 2, AO_IgnoreError= 2 }; typedef AbortOption CommitType; /** * Execution type of transaction */ enum ExecType { NoExecTypeDef = -1, ///< Erroneous type (Used for debugging only) Prepare, ///< <i>Missing explanation</i> NoCommit, ///< Execute the transaction as far as it has ///< been defined, but do not yet commit it Commit, ///< Execute and try to commit the transaction Rollback ///< Rollback transaction NoExecTypeDef = -1, Prepare, NoCommit, Commit, Rollback }; #endif /** * @class NdbTransaction Loading Loading @@ -99,17 +87,17 @@ enum ExecType { * before calling execute(). * * A call to execute() uses one out of three types of execution: * -# ExecType::NoCommit Executes operations without committing them. * -# ExecType::Commit Executes remaining operation and commits the * -# NdbTransaction::NoCommit Executes operations without committing them. * -# NdbTransaction::Commit Executes remaining operation and commits the * complete transaction * -# ExecType::Rollback Rollbacks the entire transaction. * -# NdbTransaction::Rollback Rollbacks the entire transaction. * * execute() is equipped with an extra error handling parameter. * There are two alternatives: * -# AbortOption::AbortOnError (default). * -# NdbTransaction::AbortOnError (default). * The transaction is aborted if there are any error during the * execution * -# AbortOption::IgnoreError * -# NdbTransaction::AO_IgnoreError * Continue execution of transaction even if operation fails * */ Loading Loading @@ -141,6 +129,7 @@ enum ExecType { * primary key since it came along from the scanned tuple. * */ class NdbTransaction { #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL Loading @@ -154,6 +143,44 @@ class NdbTransaction public: /** * Commit type of transaction */ enum AbortOption { AbortOnError= ///< Abort transaction on failed operation #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL ::AbortOnError #endif ,AO_IgnoreError= ///< Transaction continues on failed operation #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL ::AO_IgnoreError #endif }; /** * Execution type of transaction */ enum ExecType { #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL NoExecTypeDef= ::NoExecTypeDef, ///< Erroneous type (Used for debugging only) Prepare= ::Prepare, ///< <i>Missing explanation</i> #endif NoCommit= ///< Execute the transaction as far as it has ///< been defined, but do not yet commit it #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL ::NoCommit #endif ,Commit= ///< Execute and try to commit the transaction #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL ::Commit #endif ,Rollback ///< Rollback transaction #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL = ::Rollback #endif }; /** * Get an NdbOperation for a table. * Note that the operation has to be defined before it is executed. Loading Loading @@ -284,6 +311,12 @@ public: int execute(ExecType execType, AbortOption abortOption = AbortOnError, int force = 0 ); #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED int execute(::ExecType execType, ::AbortOption abortOption = ::AbortOnError, int force = 0 ) { return execute ((ExecType)execType,(AbortOption)abortOption,force); } #endif #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL // to be documented later Loading Loading @@ -314,6 +347,14 @@ public: NdbAsynchCallback callback, void* anyObject, AbortOption abortOption = AbortOnError); #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED void executeAsynchPrepare(::ExecType execType, NdbAsynchCallback callback, void* anyObject, ::AbortOption abortOption = ::AbortOnError) { executeAsynchPrepare((ExecType)execType, callback, anyObject, (AbortOption)abortOption); } #endif /** * Prepare and send an asynchronous transaction. Loading @@ -332,6 +373,14 @@ public: NdbAsynchCallback aCallback, void* anyObject, AbortOption abortOption = AbortOnError); #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED void executeAsynch(::ExecType aTypeOfExec, NdbAsynchCallback aCallback, void* anyObject, ::AbortOption abortOption= ::AbortOnError) { executeAsynch((ExecType)aTypeOfExec, aCallback, anyObject, (AbortOption)abortOption); } #endif #endif /** * Refresh Loading
ndb/src/ndbapi/NdbBlob.cpp +23 −22 Original line number Diff line number Diff line Loading @@ -875,7 +875,7 @@ NdbBlob::readParts(char* buf, Uint32 part, Uint32 count) setErrorCode(tOp); return -1; } tOp->m_abortOption = AbortOnError; tOp->m_abortOption = NdbTransaction::AbortOnError; buf += thePartSize; n++; thePendingBlobOps |= (1 << NdbOperation::ReadRequest); Loading @@ -898,7 +898,7 @@ NdbBlob::insertParts(const char* buf, Uint32 part, Uint32 count) setErrorCode(tOp); return -1; } tOp->m_abortOption = AbortOnError; tOp->m_abortOption = NdbTransaction::AbortOnError; buf += thePartSize; n++; thePendingBlobOps |= (1 << NdbOperation::InsertRequest); Loading @@ -921,7 +921,7 @@ NdbBlob::updateParts(const char* buf, Uint32 part, Uint32 count) setErrorCode(tOp); return -1; } tOp->m_abortOption = AbortOnError; tOp->m_abortOption = NdbTransaction::AbortOnError; buf += thePartSize; n++; thePendingBlobOps |= (1 << NdbOperation::UpdateRequest); Loading @@ -943,7 +943,7 @@ NdbBlob::deleteParts(Uint32 part, Uint32 count) setErrorCode(tOp); return -1; } tOp->m_abortOption = AbortOnError; tOp->m_abortOption = NdbTransaction::AbortOnError; n++; thePendingBlobOps |= (1 << NdbOperation::DeleteRequest); theNdbCon->thePendingBlobOps |= (1 << NdbOperation::DeleteRequest); Loading Loading @@ -976,11 +976,11 @@ NdbBlob::deletePartsUnknown(Uint32 part) setErrorCode(tOp); return -1; } tOp->m_abortOption = AO_IgnoreError; tOp->m_abortOption= NdbTransaction::AO_IgnoreError; n++; } DBG("deletePartsUnknown: executeNoBlobs [in] bat=" << bat); if (theNdbCon->executeNoBlobs(NoCommit) == -1) if (theNdbCon->executeNoBlobs(NdbTransaction::NoCommit) == -1) return -1; DBG("deletePartsUnknown: executeNoBlobs [out]"); n = 0; Loading Loading @@ -1012,7 +1012,7 @@ NdbBlob::executePendingBlobReads() Uint8 flags = (1 << NdbOperation::ReadRequest); if (thePendingBlobOps & flags) { DBG("executePendingBlobReads: executeNoBlobs [in]"); if (theNdbCon->executeNoBlobs(NoCommit) == -1) if (theNdbCon->executeNoBlobs(NdbTransaction::NoCommit) == -1) return -1; DBG("executePendingBlobReads: executeNoBlobs [out]"); thePendingBlobOps = 0; Loading @@ -1027,7 +1027,7 @@ NdbBlob::executePendingBlobWrites() Uint8 flags = 0xFF & ~(1 << NdbOperation::ReadRequest); if (thePendingBlobOps & flags) { DBG("executePendingBlobWrites: executeNoBlobs [in]"); if (theNdbCon->executeNoBlobs(NoCommit) == -1) if (theNdbCon->executeNoBlobs(NdbTransaction::NoCommit) == -1) return -1; DBG("executePendingBlobWrites: executeNoBlobs [out]"); thePendingBlobOps = 0; Loading Loading @@ -1175,7 +1175,7 @@ NdbBlob::atPrepare(NdbTransaction* aCon, NdbOperation* anOp, const NdbColumnImpl * back after postExecute. */ int NdbBlob::preExecute(ExecType anExecType, bool& batch) NdbBlob::preExecute(NdbTransaction::ExecType anExecType, bool& batch) { DBG("preExecute [in]"); if (theState == Invalid) Loading Loading @@ -1224,7 +1224,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch) return -1; } if (isWriteOp()) { tOp->m_abortOption = AO_IgnoreError; tOp->m_abortOption = NdbTransaction::AO_IgnoreError; } theHeadInlineReadOp = tOp; // execute immediately Loading Loading @@ -1270,7 +1270,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch) return -1; } if (isWriteOp()) { tOp->m_abortOption = AO_IgnoreError; tOp->m_abortOption = NdbTransaction::AO_IgnoreError; } theHeadInlineReadOp = tOp; // execute immediately Loading Loading @@ -1316,18 +1316,18 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch) * any remaining prepared operations. */ int NdbBlob::postExecute(ExecType anExecType) NdbBlob::postExecute(NdbTransaction::ExecType anExecType) { DBG("postExecute [in] type=" << anExecType); if (theState == Invalid) return -1; if (theState == Active) { setState(anExecType == NoCommit ? Active : Closed); setState(anExecType == NdbTransaction::NoCommit ? Active : Closed); DBG("postExecute [skip]"); return 0; } assert(theState == Prepared); setState(anExecType == NoCommit ? Active : Closed); setState(anExecType == NdbTransaction::NoCommit ? Active : Closed); assert(isKeyOp()); if (isIndexOp()) { NdbBlob* tFirstBlob = theNdbOp->theBlobList; Loading @@ -1343,14 +1343,15 @@ NdbBlob::postExecute(ExecType anExecType) return -1; if (theGetFlag) { assert(theGetSetBytes == 0 || theGetBuf != 0); assert(theGetSetBytes <= theInlineSize || anExecType == NoCommit); assert(theGetSetBytes <= theInlineSize || anExecType == NdbTransaction::NoCommit); Uint32 bytes = theGetSetBytes; if (readDataPrivate(theGetBuf, bytes) == -1) return -1; } } if (isUpdateOp()) { assert(anExecType == NoCommit); assert(anExecType == NdbTransaction::NoCommit); getHeadFromRecAttr(); if (theSetFlag) { // setValue overwrites everything Loading @@ -1367,7 +1368,7 @@ NdbBlob::postExecute(ExecType anExecType) } } if (isWriteOp() && isTableOp()) { assert(anExecType == NoCommit); assert(anExecType == NdbTransaction::NoCommit); if (theHeadInlineReadOp->theError.code == 0) { int tNullFlag = theNullFlag; Uint64 tLength = theLength; Loading Loading @@ -1418,18 +1419,18 @@ NdbBlob::postExecute(ExecType anExecType) } } if (isDeleteOp()) { assert(anExecType == NoCommit); assert(anExecType == NdbTransaction::NoCommit); getHeadFromRecAttr(); if (deleteParts(0, getPartCount()) == -1) return -1; } setState(anExecType == NoCommit ? Active : Closed); setState(anExecType == NdbTransaction::NoCommit ? Active : Closed); // activation callback if (theActiveHook != NULL) { if (invokeActiveHook() == -1) return -1; } if (anExecType == NoCommit && theHeadInlineUpdateFlag) { if (anExecType == NdbTransaction::NoCommit && theHeadInlineUpdateFlag) { NdbOperation* tOp = theNdbCon->getNdbOperation(theTable); if (tOp == NULL || tOp->updateTuple() == -1 || Loading @@ -1438,7 +1439,7 @@ NdbBlob::postExecute(ExecType anExecType) setErrorCode(NdbBlobImpl::ErrAbort); return -1; } tOp->m_abortOption = AbortOnError; tOp->m_abortOption = NdbTransaction::AbortOnError; DBG("added op to update head+inline"); } DBG("postExecute [out]"); Loading Loading @@ -1468,7 +1469,7 @@ NdbBlob::preCommit() setErrorCode(NdbBlobImpl::ErrAbort); return -1; } tOp->m_abortOption = AbortOnError; tOp->m_abortOption = NdbTransaction::AbortOnError; DBG("added op to update head+inline"); } } Loading