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
chore(compilation): to resolve unexpected boost warnings
This commit is contained in:
@ -83,10 +83,11 @@ pthread_mutex_t mcs_mutex;
|
|||||||
Function we use in the creation of our hash to get key.
|
Function we use in the creation of our hash to get key.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static uchar* mcs_get_key(COLUMNSTORE_SHARE* share, size_t* length, my_bool not_used __attribute__((unused)))
|
static uchar* mcs_get_key(void* share, size_t* length, my_bool not_used __attribute__((unused)))
|
||||||
{
|
{
|
||||||
*length = share->table_name_length;
|
auto* sharePtr = reinterpret_cast<COLUMNSTORE_SHARE*>(share);
|
||||||
return (uchar*)share->table_name;
|
*length = sharePtr->table_name_length;
|
||||||
|
return (uchar*)sharePtr->table_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This one is unused
|
// This one is unused
|
||||||
|
@ -58,7 +58,7 @@ namespace WriteEngine
|
|||||||
{
|
{
|
||||||
BRMWrapper* volatile BRMWrapper::m_instance = NULL;
|
BRMWrapper* volatile BRMWrapper::m_instance = NULL;
|
||||||
std::atomic<bool> BRMWrapper::finishReported(false);
|
std::atomic<bool> BRMWrapper::finishReported(false);
|
||||||
boost::thread_specific_ptr<int> BRMWrapper::m_ThreadDataPtr;
|
thread_local int BRMWrapper::m_brmRc = 0;
|
||||||
boost::mutex BRMWrapper::m_instanceCreateMutex;
|
boost::mutex BRMWrapper::m_instanceCreateMutex;
|
||||||
|
|
||||||
bool BRMWrapper::m_useVb = true;
|
bool BRMWrapper::m_useVb = true;
|
||||||
@ -441,17 +441,7 @@ int BRMWrapper::saveState()
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void BRMWrapper::saveBrmRc(int brmRc)
|
void BRMWrapper::saveBrmRc(int brmRc)
|
||||||
{
|
{
|
||||||
int* dataPtr = m_ThreadDataPtr.get();
|
m_brmRc = brmRc;
|
||||||
|
|
||||||
if (dataPtr == 0)
|
|
||||||
{
|
|
||||||
dataPtr = new int(brmRc);
|
|
||||||
m_ThreadDataPtr.reset(dataPtr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
*dataPtr = brmRc;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@ -555,13 +545,10 @@ int BRMWrapper::getTableLockInfo(uint64_t lockID, BRM::TableLockInfo* lockInfo,
|
|||||||
/* static */
|
/* static */
|
||||||
int BRMWrapper::getBrmRc(bool reset)
|
int BRMWrapper::getBrmRc(bool reset)
|
||||||
{
|
{
|
||||||
if (m_ThreadDataPtr.get() == 0)
|
int brmRc = m_brmRc;
|
||||||
return BRM::ERR_OK;
|
|
||||||
|
|
||||||
int brmRc = *m_ThreadDataPtr;
|
|
||||||
|
|
||||||
if (reset)
|
if (reset)
|
||||||
m_ThreadDataPtr.reset(new int(BRM::ERR_OK));
|
m_brmRc = static_cast<int>(BRM::ERR_OK);
|
||||||
|
|
||||||
return brmRc;
|
return brmRc;
|
||||||
}
|
}
|
||||||
|
@ -466,7 +466,7 @@ class BRMWrapper : public WEObj
|
|||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
|
||||||
static BRMWrapper* volatile m_instance;
|
static BRMWrapper* volatile m_instance;
|
||||||
static boost::thread_specific_ptr<int> m_ThreadDataPtr;
|
static thread_local int m_brmRc;
|
||||||
static boost::mutex m_instanceCreateMutex;
|
static boost::mutex m_instanceCreateMutex;
|
||||||
|
|
||||||
EXPORT static bool m_useVb;
|
EXPORT static bool m_useVb;
|
||||||
|
Reference in New Issue
Block a user