diff options
author | unknown <joreland@mysql.com> | 2004-11-11 10:45:45 +0100 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2004-11-11 10:45:45 +0100 |
commit | 7d78fe866a458e21f7df17c3b014fab64a7953f9 (patch) | |
tree | 9e0c7a25254a4da9687e3a841d9570529f583760 /ndb/src/ndbapi/NdbBlob.cpp | |
parent | 971660bec5ff29fc54956d3e7f42e951e0549bac (diff) | |
parent | ed78385899fcc1e6f4f66b50d17a8869144b2d01 (diff) | |
download | mariadb-git-7d78fe866a458e21f7df17c3b014fab64a7953f9.tar.gz |
merge
ndb/include/ndbapi/NdbOperation.hpp:
Auto merged
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
Auto merged
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Auto merged
ndb/src/ndbapi/NdbConnection.cpp:
Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Auto merged
ndb/src/ndbapi/NdbOperation.cpp:
Auto merged
ndb/src/ndbapi/NdbOperationExec.cpp:
Auto merged
ndb/src/ndbapi/NdbScanOperation.cpp:
Auto merged
ndb/include/ndbapi/NdbIndexOperation.hpp:
merge (again)
ndb/src/ndbapi/NdbBlob.cpp:
merge (again)
ndb/src/ndbapi/NdbIndexOperation.cpp:
merge (again)
Diffstat (limited to 'ndb/src/ndbapi/NdbBlob.cpp')
-rw-r--r-- | ndb/src/ndbapi/NdbBlob.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ndb/src/ndbapi/NdbBlob.cpp b/ndb/src/ndbapi/NdbBlob.cpp index 53c0a0e07f9..0ba14185adb 100644 --- a/ndb/src/ndbapi/NdbBlob.cpp +++ b/ndb/src/ndbapi/NdbBlob.cpp @@ -113,6 +113,8 @@ NdbBlob::getBlobTable(NdbTableImpl& bt, const NdbTableImpl* t, const NdbColumnIm } { NdbDictionary::Column bc("PART"); bc.setType(NdbDictionary::Column::Unsigned); + assert(t->m_keyLenInWords != 0); + bc.setLength(t->m_keyLenInWords); bc.setPrimaryKey(true); bc.setDistributionKey(false); bt.addColumn(bc); @@ -346,7 +348,7 @@ int NdbBlob::setTableKeyValue(NdbOperation* anOp) { const Uint32* data = (const Uint32*)theKeyBuf.data; - DBG("setTableKeyValue key=" << ndb_blob_debug(data, theTable->m_sizeOfKeysInWords)); + DBG("setTableKeyValue key=" << ndb_blob_debug(data, theTable->m_keyLenInWords)); const unsigned columns = theTable->m_columns.size(); unsigned pos = 0; for (unsigned i = 0; i < columns; i++) { @@ -369,7 +371,7 @@ int NdbBlob::setAccessKeyValue(NdbOperation* anOp) { const Uint32* data = (const Uint32*)theAccessKeyBuf.data; - DBG("setAccessKeyValue key=" << ndb_blob_debug(data, theAccessTable->m_sizeOfKeysInWords)); + DBG("setAccessKeyValue key=" << ndb_blob_debug(data, theAccessTable->m_keyLenInWords)); const unsigned columns = theAccessTable->m_columns.size(); unsigned pos = 0; for (unsigned i = 0; i < columns; i++) { @@ -392,7 +394,7 @@ int NdbBlob::setPartKeyValue(NdbOperation* anOp, Uint32 part) { Uint32* data = (Uint32*)theKeyBuf.data; - unsigned size = theTable->m_sizeOfKeysInWords; + unsigned size = theTable->m_keyLenInWords; DBG("setPartKeyValue dist=" << getDistKey(part) << " part=" << part << " key=" << ndb_blob_debug(data, size)); // TODO use attr ids after compatibility with 4.1.7 not needed if (anOp->equal("PK", theKeyBuf.data) == -1 || @@ -1105,8 +1107,8 @@ NdbBlob::atPrepare(NdbConnection* aCon, NdbOperation* anOp, const NdbColumnImpl* theBlobTable = &NdbTableImpl::getImpl(*bt); } // buffers - theKeyBuf.alloc(theTable->m_sizeOfKeysInWords << 2); - theAccessKeyBuf.alloc(theAccessTable->m_sizeOfKeysInWords << 2); + theKeyBuf.alloc(theTable->m_keyLenInWords << 2); + theAccessKeyBuf.alloc(theAccessTable->m_keyLenInWords << 2); theHeadInlineBuf.alloc(sizeof(Head) + theInlineSize); theHeadInlineCopyBuf.alloc(sizeof(Head) + theInlineSize); thePartBuf.alloc(thePartSize); @@ -1118,7 +1120,7 @@ NdbBlob::atPrepare(NdbConnection* aCon, NdbOperation* anOp, const NdbColumnImpl* if (isTableOp()) { // get table key Uint32* data = (Uint32*)theKeyBuf.data; - unsigned size = theTable->m_sizeOfKeysInWords; + unsigned size = theTable->m_keyLenInWords; if (theNdbOp->getKeyFromTCREQ(data, size) == -1) { setErrorCode(ErrUsage); return -1; @@ -1127,7 +1129,7 @@ NdbBlob::atPrepare(NdbConnection* aCon, NdbOperation* anOp, const NdbColumnImpl* if (isIndexOp()) { // get index key Uint32* data = (Uint32*)theAccessKeyBuf.data; - unsigned size = theAccessTable->m_sizeOfKeysInWords; + unsigned size = theAccessTable->m_keyLenInWords; if (theNdbOp->getKeyFromTCREQ(data, size) == -1) { setErrorCode(ErrUsage); return -1; @@ -1487,7 +1489,7 @@ NdbBlob::atNextResult() assert(isScanOp()); // get primary key { Uint32* data = (Uint32*)theKeyBuf.data; - unsigned size = theTable->m_sizeOfKeysInWords; + unsigned size = theTable->m_keyLenInWords; if (((NdbScanOperation*)theNdbOp)->getKeyFromKEYINFO20(data, size) == -1) { setErrorCode(ErrUsage); return -1; |