Commit 37a4780d authored by unknown's avatar unknown

Fixed error in constants


storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Set up node group information as default if no node group info is
  passed in create table message.
parent 1eabb412
...@@ -6220,6 +6220,17 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal) ...@@ -6220,6 +6220,17 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal)
noOfFragments = 1; noOfFragments = 1;
set_default_node_groups(signal, noOfFragments); set_default_node_groups(signal, noOfFragments);
break; break;
case DictTabInfo::DistrKeyHash:
jam();
case DictTabInfo::DistrKeyLin:
jam();
if (noOfFragments == 0)
{
jam();
noOfFragments = csystemnodes;
set_default_node_groups(signal, noOfFragments);
}
break;
default: default:
jam(); jam();
if (noOfFragments == 0) if (noOfFragments == 0)
......
...@@ -510,20 +510,18 @@ NdbTableImpl::get_nodes(Uint32 hashValue, const Uint16 ** nodes) const ...@@ -510,20 +510,18 @@ NdbTableImpl::get_nodes(Uint32 hashValue, const Uint16 ** nodes) const
return 0; return 0;
switch (m_fragmentType) switch (m_fragmentType)
{ {
case AllNodesSmallTable: case NdbDictionary::Object::FragAllSmall:
case AllNodesMediumTable: case NdbDictionary::Object::FragAllMedium:
case AllNodesLargeTable: case NdbDictionary::Object::FragAllLarge:
case SingleFragment: case NdbDictionary::Object::FragSingle:
case DistrKeyLin: case NdbDictionary::Object::DistrKeyLin:
{ {
Uint32 fragmentId = hashValue & m_hashValueMask; fragmentId = hashValue & m_hashValueMask;
if(fragmentId < m_hashpointerValue) if(fragmentId < m_hashpointerValue)
{
fragmentId = hashValue & ((m_hashValueMask << 1) + 1); fragmentId = hashValue & ((m_hashValueMask << 1) + 1);
}
break; break;
} }
case DistrKeyHash: case NdbDictionary::Object::DistrKeyHash:
{ {
fragmentId = hashValue % m_fragmentCount; fragmentId = hashValue % m_fragmentCount;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment