Commit 5c5cf8c4 authored by unknown's avatar unknown

small fixes of select count(*)


ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Fix init
ndb/tools/select_count.cpp:
  row count is 64 bit
parent fa5d6ac3
......@@ -212,12 +212,15 @@ NdbColumnImpl::create_psuedo(const char * name){
} else if(!strcmp(name, "NDB$ROW_COUNT")){
col->setType(NdbDictionary::Column::Bigunsigned);
col->m_impl.m_attrId = AttributeHeader::ROW_COUNT;
col->m_impl.m_attrSize = 8;
} else if(!strcmp(name, "NDB$COMMIT_COUNT")){
col->setType(NdbDictionary::Column::Bigunsigned);
col->m_impl.m_attrId = AttributeHeader::COMMIT_COUNT;
col->m_impl.m_attrSize = 8;
} else {
abort();
}
return col;
}
/**
......@@ -642,7 +645,9 @@ NdbDictionaryImpl::setTransporter(class Ndb* ndb,
NdbColumnImpl::create_psuedo("NDB$COMMIT_COUNT");
}
m_globalHash->unlock();
return true;
}
return false;
}
NdbTableImpl *
......
......@@ -144,7 +144,7 @@ select_count(Ndb* pNdb, const NdbDictionary::Table* pTab,
return NDBT_FAILED;
}
Uint32 tmp;
Uint64 tmp;
pOp->getValue(NdbDictionary::Column::ROW_COUNT, (char*)&tmp);
check = pTrans->execute(NoCommit);
......
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