Commit 78804c21 authored by joreland@mysql.com's avatar joreland@mysql.com

ndb - Fix init of replica/frag count in ndb api

parent fadd2bea
...@@ -1349,8 +1349,9 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret, ...@@ -1349,8 +1349,9 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret,
if(tableDesc.FragmentDataLen > 0) if(tableDesc.FragmentDataLen > 0)
{ {
int i; int i;
Uint32 fragCount = tableDesc.FragmentData[0]; Uint32 replicaCount = tableDesc.FragmentData[0];
Uint32 replicaCount = tableDesc.FragmentData[1]; Uint32 fragCount = tableDesc.FragmentData[1];
impl->m_replicaCount = replicaCount; impl->m_replicaCount = replicaCount;
impl->m_fragmentCount = fragCount; impl->m_fragmentCount = fragCount;
...@@ -1359,9 +1360,6 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret, ...@@ -1359,9 +1360,6 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret,
impl->m_fragments.push_back(tableDesc.FragmentData[i+2]); impl->m_fragments.push_back(tableDesc.FragmentData[i+2]);
} }
impl->m_replicaCount = replicaCount;
impl->m_fragmentCount = fragCount;
Uint32 topBit = (1 << 31); Uint32 topBit = (1 << 31);
for(int i = 31; i>=0; i--){ for(int i = 31; i>=0; i--){
if((fragCount & topBit) != 0) if((fragCount & topBit) != 0)
......
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