diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp index 72a803fe854..a22e2c28cd7 100644 --- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp @@ -6220,6 +6220,17 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal) noOfFragments = 1; set_default_node_groups(signal, noOfFragments); break; + case DictTabInfo::DistrKeyHash: + jam(); + case DictTabInfo::DistrKeyLin: + jam(); + if (noOfFragments == 0) + { + jam(); + noOfFragments = csystemnodes; + set_default_node_groups(signal, noOfFragments); + } + break; default: jam(); if (noOfFragments == 0) diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp index 8211fc32625..ce5827ab7f4 100644 --- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -510,20 +510,18 @@ NdbTableImpl::get_nodes(Uint32 hashValue, const Uint16 ** nodes) const return 0; switch (m_fragmentType) { - case AllNodesSmallTable: - case AllNodesMediumTable: - case AllNodesLargeTable: - case SingleFragment: - case DistrKeyLin: + case NdbDictionary::Object::FragAllSmall: + case NdbDictionary::Object::FragAllMedium: + case NdbDictionary::Object::FragAllLarge: + case NdbDictionary::Object::FragSingle: + case NdbDictionary::Object::DistrKeyLin: { - Uint32 fragmentId = hashValue & m_hashValueMask; + fragmentId = hashValue & m_hashValueMask; if(fragmentId < m_hashpointerValue) - { fragmentId = hashValue & ((m_hashValueMask << 1) + 1); - } break; } - case DistrKeyHash: + case NdbDictionary::Object::DistrKeyHash: { fragmentId = hashValue % m_fragmentCount; break;