1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-5021 Some minor fixes.

This commit is contained in:
Gagan Goel
2022-07-14 17:53:17 -04:00
parent 94e9f55940
commit 1355237ca3
8 changed files with 46 additions and 15 deletions

View File

@ -3755,6 +3755,16 @@ CalpontSystemCatalog::OID CalpontSystemCatalog::isAUXColumnOID(const OID& oid)
checkSysCatVer();
boost::mutex::scoped_lock lk1(fAUXColumnOIDToTableOIDMapLock);
AUXColumnOIDTableOIDmap::const_iterator iter = fAUXColumnOIDToTableOIDMap.find(oid);
if (iter != fAUXColumnOIDToTableOIDMap.end())
{
return iter->second;
}
lk1.unlock();
// select objectid from systable where auxcolumnoid = oid;
CalpontSelectExecutionPlan csep;
CalpontSelectExecutionPlan::ReturnedColumnList returnedColumnList;
@ -3818,7 +3828,10 @@ CalpontSystemCatalog::OID CalpontSystemCatalog::isAUXColumnOID(const OID& oid)
{
if ((*it)->dataCount() == 1)
{
return (OID)((*it)->GetData(0));
// populate cache
lk1.lock();
fAUXColumnOIDToTableOIDMap[oid] = (OID)((*it)->GetData(0));
return fAUXColumnOIDToTableOIDMap[oid];
}
else
{
@ -3827,7 +3840,10 @@ CalpontSystemCatalog::OID CalpontSystemCatalog::isAUXColumnOID(const OID& oid)
}
}
return (OID)(0);
// populate cache
lk1.lock();
fAUXColumnOIDToTableOIDMap[oid] = 0;
return fAUXColumnOIDToTableOIDMap[oid];
}
#if 0
@ -5871,6 +5887,10 @@ void CalpontSystemCatalog::flushCache()
fTableAUXColumnOIDMap.clear();
auxlk.unlock();
boost::mutex::scoped_lock auxtotableoidlk(fAUXColumnOIDToTableOIDMapLock);
fAUXColumnOIDToTableOIDMap.clear();
auxtotableoidlk.unlock();
boost::recursive_mutex::scoped_lock lk4(fDctTokenMapLock);
fDctTokenMap.clear();
buildSysDctmap();