You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
No boost condition (#2822)
This patch replaces boost primitives with stdlib counterparts.
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
#include <limits>
|
||||
using namespace std;
|
||||
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/scoped_array.hpp>
|
||||
using namespace boost;
|
||||
@@ -31,13 +32,13 @@ using namespace boost;
|
||||
#include "autoincrementdata.h"
|
||||
|
||||
/*static*/
|
||||
boost::mutex AutoincrementData::map_mutex;
|
||||
std::mutex AutoincrementData::map_mutex;
|
||||
/*static*/
|
||||
AutoincrementData::AutoincDataMap AutoincrementData::fAutoincDataMap;
|
||||
/* static */
|
||||
AutoincrementData* AutoincrementData::makeAutoincrementData(uint32_t sessionID)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(map_mutex);
|
||||
std::unique_lock lock(map_mutex);
|
||||
AutoincrementData* instance;
|
||||
AutoincDataMap::const_iterator it = fAutoincDataMap.find(sessionID);
|
||||
|
||||
@@ -54,7 +55,7 @@ AutoincrementData* AutoincrementData::makeAutoincrementData(uint32_t sessionID)
|
||||
/* static */
|
||||
void AutoincrementData::removeAutoincrementData(uint32_t sessionID)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(map_mutex);
|
||||
std::unique_lock lock(map_mutex);
|
||||
AutoincDataMap::iterator it = fAutoincDataMap.find(sessionID);
|
||||
|
||||
if (it != fAutoincDataMap.end())
|
||||
@@ -73,13 +74,13 @@ AutoincrementData::~AutoincrementData()
|
||||
|
||||
void AutoincrementData::setNextValue(uint32_t columnOid, long long nextValue)
|
||||
{
|
||||
boost::mutex::scoped_lock lk(fOIDnextvalLock);
|
||||
std::unique_lock lk(fOIDnextvalLock);
|
||||
fOidNextValueMap[columnOid] = nextValue;
|
||||
}
|
||||
|
||||
long long AutoincrementData::getNextValue(uint32_t columnOid)
|
||||
{
|
||||
boost::mutex::scoped_lock lk(fOIDnextvalLock);
|
||||
std::unique_lock lk(fOIDnextvalLock);
|
||||
long long nextValue = 0;
|
||||
OIDNextValue::iterator it = fOidNextValueMap.find(columnOid);
|
||||
|
||||
@@ -93,7 +94,7 @@ long long AutoincrementData::getNextValue(uint32_t columnOid)
|
||||
|
||||
AutoincrementData::OIDNextValue& AutoincrementData::getOidNextValueMap()
|
||||
{
|
||||
boost::mutex::scoped_lock lk(fOIDnextvalLock);
|
||||
std::unique_lock lk(fOIDnextvalLock);
|
||||
|
||||
return fOidNextValueMap;
|
||||
}
|
||||
|
Reference in New Issue
Block a user