mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
wl1504 - scan using distribution key and EQ_BOUND
ndb/include/kernel/signaldata/ScanTab.hpp: Add distribution key to ScanTab to enable scanning of specific fragment ndb/include/ndbapi/NdbOperation.hpp: New methods for controlling distribution/partitioning ndb/include/ndbapi/NdbScanOperation.hpp: New methods for controlling distribution/partitioning ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Don't mask away kvalue from hash while computing fragId ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Add distribution key to ScanTab to enable scanning of specific fragment ndb/src/ndbapi/NdbBlob.cpp: removed m_sizeOfKeysInWords which was the same a m_keyLenInWords ndb/src/ndbapi/NdbConnection.cpp: removed explicit cast ndb/src/ndbapi/NdbDictionaryImpl.cpp: removed m_sizeOfKeysInWords which was the same a m_keyLenInWords ndb/src/ndbapi/NdbDictionaryImpl.hpp: removed m_sizeOfKeysInWords which was the same a m_keyLenInWords ndb/src/ndbapi/NdbIndexOperation.cpp: removed theFirstKEYINFO and replaced that with theTCREQ->next ndb/src/ndbapi/NdbOperation.cpp: removed theFirstKEYINFO and replaced that with theTCREQ->next ndb/src/ndbapi/NdbOperationExec.cpp: removed theFirstKEYINFO and replaced that with theTCREQ->next ndb/src/ndbapi/NdbOperationSearch.cpp: removed theFirstKEYINFO and replaced that with theTCREQ->next Enable partition scan ndb/src/ndbapi/NdbScanOperation.cpp: removed theFirstKEYINFO and replaced that with theTCREQ->next Enable partition scan
This commit is contained in:
@@ -265,8 +265,9 @@ NdbTableImpl::init(){
|
||||
m_indexType = NdbDictionary::Index::Undefined;
|
||||
|
||||
m_noOfKeys = 0;
|
||||
m_noOfDistributionKeys = 0;
|
||||
m_fragmentCount = 0;
|
||||
m_sizeOfKeysInWords = 0;
|
||||
m_keyLenInWords = 0;
|
||||
m_noOfBlobs = 0;
|
||||
}
|
||||
|
||||
@@ -345,8 +346,9 @@ NdbTableImpl::assign(const NdbTableImpl& org)
|
||||
delete m_index;
|
||||
m_index = org.m_index;
|
||||
|
||||
m_noOfDistributionKeys = org.m_noOfDistributionKeys;
|
||||
m_noOfKeys = org.m_noOfKeys;
|
||||
m_sizeOfKeysInWords = org.m_sizeOfKeysInWords;
|
||||
m_keyLenInWords = org.m_keyLenInWords;
|
||||
m_noOfBlobs = org.m_noOfBlobs;
|
||||
|
||||
m_version = org.m_version;
|
||||
@@ -1213,6 +1215,7 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret,
|
||||
Uint32 keyInfoPos = 0;
|
||||
Uint32 keyCount = 0;
|
||||
Uint32 blobCount = 0;
|
||||
Uint32 distKeys = 0;
|
||||
|
||||
for(Uint32 i = 0; i < tableDesc.NoOfAttributes; i++) {
|
||||
DictTabInfo::Attribute attrDesc; attrDesc.init();
|
||||
@@ -1276,6 +1279,9 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret,
|
||||
col->m_keyInfoPos = keyInfoPos + 1;
|
||||
keyInfoPos += ((col->m_attrSize * col->m_arraySize + 3) / 4);
|
||||
keyCount++;
|
||||
|
||||
if(attrDesc.AttributeDKey)
|
||||
distKeys++;
|
||||
} else {
|
||||
col->m_keyInfoPos = 0;
|
||||
}
|
||||
@@ -1294,8 +1300,8 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret,
|
||||
|
||||
impl->m_noOfKeys = keyCount;
|
||||
impl->m_keyLenInWords = keyInfoPos;
|
||||
impl->m_sizeOfKeysInWords = keyInfoPos;
|
||||
impl->m_noOfBlobs = blobCount;
|
||||
impl->m_noOfDistributionKeys = distKeys;
|
||||
* ret = impl;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user