=== modified file 'storage/ndb/include/ndbapi/NdbBlob.hpp' --- storage/ndb/include/ndbapi/NdbBlob.hpp 2008-02-19 10:41:22 +0000 +++ storage/ndb/include/ndbapi/NdbBlob.hpp 2008-10-22 16:03:37 +0000 @@ -263,6 +263,13 @@ public: */ const NdbError& getNdbError() const; /** + * Get a pointer to the operation which this Blob Handle + * was initially created as part of. + * Note that this could be a scan operation. + * Note that the pointer returned is a const pointer. + */ + const NdbOperation* getNdbOperation() const; + /** * Return info about all blobs in this operation. * * Get first blob in list. === modified file 'storage/ndb/include/ndbapi/NdbOperation.hpp' --- storage/ndb/include/ndbapi/NdbOperation.hpp 2008-08-07 06:24:52 +0000 +++ storage/ndb/include/ndbapi/NdbOperation.hpp 2008-10-22 16:05:47 +0000 @@ -836,7 +836,7 @@ public: * * @return method number where the error occured. */ - int getNdbErrorLine(); + int getNdbErrorLine() const; /** * Get table name of this operation. @@ -885,6 +885,11 @@ public: */ AbortOption getAbortOption() const; int setAbortOption(AbortOption); + + /** + * Get NdbTransaction object pointer for this operation + */ + virtual NdbTransaction* getNdbTransaction() const; #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL @@ -1037,7 +1042,6 @@ protected: public: #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL - NdbTransaction* getNdbTransaction(); const NdbOperation* next() const; const NdbRecAttr* getFirstRecAttr() const; #endif @@ -1468,7 +1472,7 @@ NdbOperation::setStartIndicator() inline int -NdbOperation::getNdbErrorLine() +NdbOperation::getNdbErrorLine() const { return theErrorLine; } === modified file 'storage/ndb/include/ndbapi/NdbScanOperation.hpp' --- storage/ndb/include/ndbapi/NdbScanOperation.hpp 2008-08-11 12:44:24 +0000 +++ storage/ndb/include/ndbapi/NdbScanOperation.hpp 2008-10-22 16:07:13 +0000 @@ -377,6 +377,11 @@ public: const NdbOperation::OperationOptions *opts = 0, Uint32 sizeOfOptions = 0); + /** + * Get NdbTransaction object for this scan operation + */ + NdbTransaction* getNdbTransaction() const; + protected: NdbScanOperation(Ndb* aNdb, NdbOperation::Type aType = NdbOperation::TableScan); @@ -651,4 +656,14 @@ NdbScanOperation::deleteCurrentTuple(Ndb opts, sizeOfOptions); } +inline +NdbTransaction* +NdbScanOperation::getNdbTransaction() const +{ + /* return the user visible transaction object ptr, not the + * scan's 'internal' / buddy transaction object + */ + return m_transConnection; +}; + #endif === modified file 'storage/ndb/src/ndbapi/NdbBlob.cpp' --- storage/ndb/src/ndbapi/NdbBlob.cpp 2008-06-03 10:00:31 +0000 +++ storage/ndb/src/ndbapi/NdbBlob.cpp 2008-10-22 16:06:19 +0000 @@ -3070,3 +3070,8 @@ NdbBlob::blobsNextBlob() return theNext; } +const NdbOperation* +NdbBlob::getNdbOperation() const +{ + return theNdbOp; +}; === modified file 'storage/ndb/src/ndbapi/NdbOperation.cpp' --- storage/ndb/src/ndbapi/NdbOperation.cpp 2008-04-17 06:59:16 +0000 +++ storage/ndb/src/ndbapi/NdbOperation.cpp 2008-10-22 16:07:52 +0000 @@ -517,7 +517,7 @@ NdbOperation::getTable() const } NdbTransaction* -NdbOperation::getNdbTransaction() +NdbOperation::getNdbTransaction() const { return theNdbCon; }