Commit 2258fd67 authored by joreland@mysql.com's avatar joreland@mysql.com

small fixes of select count(*)

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