diff options
Diffstat (limited to 'ndb/src/ndbapi/NdbOperationDefine.cpp')
-rw-r--r-- | ndb/src/ndbapi/NdbOperationDefine.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ndb/src/ndbapi/NdbOperationDefine.cpp b/ndb/src/ndbapi/NdbOperationDefine.cpp index 18f8b79d12e..2ba86d93251 100644 --- a/ndb/src/ndbapi/NdbOperationDefine.cpp +++ b/ndb/src/ndbapi/NdbOperationDefine.cpp @@ -35,6 +35,7 @@ #include "NdbUtil.hpp" #include "NdbOut.hpp" #include "NdbImpl.hpp" +#include "NdbBlob.hpp" #include <Interpreter.hpp> @@ -604,6 +605,33 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo, return 0; }//NdbOperation::setValue() +NdbBlob* +NdbOperation::getBlobHandle(NdbConnection* aCon, const NdbColumnImpl* tAttrInfo) +{ + NdbBlob* tBlob = theBlobList; + NdbBlob* tLastBlob = NULL; + while (tBlob != NULL) { + if (tBlob->theColumn == tAttrInfo) + return tBlob; + tLastBlob = tBlob; + tBlob = tBlob->theNext; + } + tBlob = theNdb->getNdbBlob(); + if (tBlob == NULL) + return NULL; + if (tBlob->atPrepare(aCon, this, tAttrInfo) == -1) { + theNdb->releaseNdbBlob(tBlob); + return NULL; + } + if (tLastBlob == NULL) + theBlobList = tBlob; + else + tLastBlob->theNext = tBlob; + tBlob->theNext = NULL; + theNdbCon->theBlobFlag = true; + return tBlob; +} + /* * Define bound on index column in range scan. */ |