You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
clang format apply
This commit is contained in:
@ -37,31 +37,31 @@ AutoincrementData::AutoincDataMap AutoincrementData::fAutoincDataMap;
|
||||
/* static */
|
||||
AutoincrementData* AutoincrementData::makeAutoincrementData(uint32_t sessionID)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(map_mutex);
|
||||
AutoincrementData* instance;
|
||||
AutoincDataMap::const_iterator it = fAutoincDataMap.find(sessionID);
|
||||
boost::mutex::scoped_lock lock(map_mutex);
|
||||
AutoincrementData* instance;
|
||||
AutoincDataMap::const_iterator it = fAutoincDataMap.find(sessionID);
|
||||
|
||||
if (it == fAutoincDataMap.end())
|
||||
{
|
||||
instance = new AutoincrementData();
|
||||
fAutoincDataMap[sessionID] = instance;
|
||||
return instance;
|
||||
}
|
||||
if (it == fAutoincDataMap.end())
|
||||
{
|
||||
instance = new AutoincrementData();
|
||||
fAutoincDataMap[sessionID] = instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
return it->second;
|
||||
return it->second;
|
||||
}
|
||||
|
||||
/* static */
|
||||
void AutoincrementData::removeAutoincrementData(uint32_t sessionID)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(map_mutex);
|
||||
AutoincDataMap::iterator it = fAutoincDataMap.find(sessionID);
|
||||
boost::mutex::scoped_lock lock(map_mutex);
|
||||
AutoincDataMap::iterator it = fAutoincDataMap.find(sessionID);
|
||||
|
||||
if (it != fAutoincDataMap.end())
|
||||
{
|
||||
delete (*it).second;
|
||||
fAutoincDataMap.erase(it);
|
||||
}
|
||||
if (it != fAutoincDataMap.end())
|
||||
{
|
||||
delete (*it).second;
|
||||
fAutoincDataMap.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
AutoincrementData::AutoincrementData()
|
||||
@ -73,28 +73,28 @@ AutoincrementData::~AutoincrementData()
|
||||
|
||||
void AutoincrementData::setNextValue(uint32_t columnOid, long long nextValue)
|
||||
{
|
||||
boost::mutex::scoped_lock lk(fOIDnextvalLock);
|
||||
fOidNextValueMap[columnOid] = nextValue;
|
||||
boost::mutex::scoped_lock lk(fOIDnextvalLock);
|
||||
fOidNextValueMap[columnOid] = nextValue;
|
||||
}
|
||||
|
||||
long long AutoincrementData::getNextValue(uint32_t columnOid)
|
||||
{
|
||||
boost::mutex::scoped_lock lk(fOIDnextvalLock);
|
||||
long long nextValue = 0;
|
||||
OIDNextValue::iterator it = fOidNextValueMap.find(columnOid);
|
||||
boost::mutex::scoped_lock lk(fOIDnextvalLock);
|
||||
long long nextValue = 0;
|
||||
OIDNextValue::iterator it = fOidNextValueMap.find(columnOid);
|
||||
|
||||
if (it != fOidNextValueMap.end())
|
||||
{
|
||||
nextValue = it->second;
|
||||
}
|
||||
if (it != fOidNextValueMap.end())
|
||||
{
|
||||
nextValue = it->second;
|
||||
}
|
||||
|
||||
return nextValue;
|
||||
return nextValue;
|
||||
}
|
||||
|
||||
AutoincrementData::OIDNextValue& AutoincrementData::getOidNextValueMap()
|
||||
{
|
||||
boost::mutex::scoped_lock lk(fOIDnextvalLock);
|
||||
boost::mutex::scoped_lock lk(fOIDnextvalLock);
|
||||
|
||||
return fOidNextValueMap;
|
||||
return fOidNextValueMap;
|
||||
}
|
||||
// vim:ts=4 sw=4:
|
||||
|
Reference in New Issue
Block a user