summaryrefslogtreecommitdiff
path: root/ndb/src/ndbapi/NdbOperationDefine.cpp
diff options
context:
space:
mode:
authorunknown <pekka@mysql.com>2004-06-10 12:04:30 +0200
committerunknown <pekka@mysql.com>2004-06-10 12:04:30 +0200
commit28306758b56aae6a009ec7e6864e9c2b4cbf46c5 (patch)
treeb6d20a2f55d76d991718a9972e7f5766ec61b240 /ndb/src/ndbapi/NdbOperationDefine.cpp
parent0d6b5946d019630145c370373871d229379e71dd (diff)
downloadmariadb-git-28306758b56aae6a009ec7e6864e9c2b4cbf46c5.tar.gz
ndb api blobs
Diffstat (limited to 'ndb/src/ndbapi/NdbOperationDefine.cpp')
-rw-r--r--ndb/src/ndbapi/NdbOperationDefine.cpp28
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.
*/