diff options
Diffstat (limited to 'ndb/src/ndbapi/NdbOperationSearch.cpp')
-rw-r--r-- | ndb/src/ndbapi/NdbOperationSearch.cpp | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/ndb/src/ndbapi/NdbOperationSearch.cpp b/ndb/src/ndbapi/NdbOperationSearch.cpp index e1d5e823077..19cb133dbf7 100644 --- a/ndb/src/ndbapi/NdbOperationSearch.cpp +++ b/ndb/src/ndbapi/NdbOperationSearch.cpp @@ -35,7 +35,6 @@ Adjust: 971022 UABMNST First version. #include <Ndb.hpp> #include "NdbImpl.hpp" #include <NdbOut.hpp> -#include "AttrType.hpp" #include <AttributeHeader.hpp> #include <signaldata/TcKeyReq.hpp> @@ -102,7 +101,7 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo, goto equal_error2; }//if }//if - } while (i < MAXNROFTUPLEKEY); + } while (i < NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY); goto equal_error2; } else { goto equal_error1; @@ -252,6 +251,17 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo, } else if ((tOpType == ReadRequest) || (tOpType == DeleteRequest) || (tOpType == ReadExclusive)) { theStatus = GetValue; + // create blob handles automatically + if (tOpType == DeleteRequest && m_currentTable->m_noOfBlobs != 0) { + for (unsigned i = 0; i < m_currentTable->m_columns.size(); i++) { + NdbColumnImpl* c = m_currentTable->m_columns[i]; + assert(c != 0); + if (c->getBlobType()) { + if (getBlobHandle(theNdbCon, c) == NULL) + return -1; + } + } + } return 0; } else if ((tOpType == InsertRequest) || (tOpType == WriteRequest)) { theStatus = SetValue; @@ -498,3 +508,24 @@ LastWordLabel: return 0; } + +int +NdbOperation::getKeyFromTCREQ(Uint32* data, unsigned size) +{ + assert(m_accessTable != 0 && m_accessTable->m_sizeOfKeysInWords != 0); + assert(m_accessTable->m_sizeOfKeysInWords == size); + unsigned pos = 0; + while (pos < 8 && pos < size) { + data[pos++] = theKEYINFOptr[pos]; + } + NdbApiSignal* tSignal = theFirstKEYINFO; + unsigned n = 0; + while (pos < size) { + if (n == 20) { + tSignal = tSignal->next(); + n = 0; + } + data[pos++] = tSignal->getDataPtrSend()[3 + n++]; + } + return 0; +} |