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
MCOL-4030: first commit of warning removals unneed const and missing virtual dtors.
This commit is contained in:
@ -119,7 +119,7 @@ public:
|
||||
/**
|
||||
* @brief Mutator to enable/disable debug logging to console.
|
||||
*/
|
||||
const void setDebugConsole ( bool debug )
|
||||
void setDebugConsole ( bool debug )
|
||||
{
|
||||
fDebugConsole = debug;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ void Cache::clear()
|
||||
* RETURN:
|
||||
* NO_ERROR if success, other otherwise
|
||||
***********************************************************/
|
||||
const int Cache::flushCache()
|
||||
int Cache::flushCache()
|
||||
{
|
||||
bool bHasReadBlock = false;
|
||||
BlockBuffer* curBuf;
|
||||
@ -216,7 +216,7 @@ void Cache::freeMemory()
|
||||
* RETURN:
|
||||
* NO_ERROR if success, other otherwise
|
||||
***********************************************************/
|
||||
const int Cache::getListSize( const CacheListType listType )
|
||||
int Cache::getListSize( const CacheListType listType )
|
||||
{
|
||||
int size = 0;
|
||||
|
||||
@ -287,7 +287,7 @@ void Cache::init( const int totalBlock, const int chkPoint, const int pctFree )
|
||||
* RETURN:
|
||||
* NO_ERROR if success, other otherwise
|
||||
***********************************************************/
|
||||
const int Cache::insertLRUList( CommBlock& cb, const uint64_t lbid, const uint64_t fbo, const unsigned char* buf )
|
||||
int Cache::insertLRUList( CommBlock& cb, const uint64_t lbid, const uint64_t fbo, const unsigned char* buf )
|
||||
{
|
||||
BlockBuffer* buffer;
|
||||
vector<BlockBuffer*>::iterator it;
|
||||
@ -322,7 +322,7 @@ const int Cache::insertLRUList( CommBlock& cb, const uint64_t lbid, const uint6
|
||||
* RETURN:
|
||||
* NO_ERROR if success, other otherwise
|
||||
***********************************************************/
|
||||
const int Cache::loadCacheBlock( const CacheKey& key, unsigned char* buf )
|
||||
int Cache::loadCacheBlock( const CacheKey& key, unsigned char* buf )
|
||||
{
|
||||
BlockBuffer* buffer;
|
||||
CacheMapIt iter;
|
||||
@ -356,7 +356,7 @@ const int Cache::loadCacheBlock( const CacheKey& key, unsigned char* buf )
|
||||
* RETURN:
|
||||
* NO_ERROR if success, other otherwise
|
||||
***********************************************************/
|
||||
const int Cache::modifyCacheBlock( const CacheKey& key, const unsigned char* buf )
|
||||
int Cache::modifyCacheBlock( const CacheKey& key, const unsigned char* buf )
|
||||
{
|
||||
BlockBuffer* buffer;
|
||||
CacheMapIt iter;
|
||||
@ -437,7 +437,7 @@ void Cache::printCacheList()
|
||||
* RETURN:
|
||||
* NO_ERROR if success, other otherwise
|
||||
***********************************************************/
|
||||
const int Cache::processCacheMap( CacheMap* map, BlockBuffer* buffer, OpType opType )
|
||||
int Cache::processCacheMap( CacheMap* map, BlockBuffer* buffer, OpType opType )
|
||||
{
|
||||
RETURN_ON_NULL( buffer, ERR_NULL_BLOCK );
|
||||
CacheMapIt iter;
|
||||
|
@ -100,16 +100,16 @@ public:
|
||||
/**
|
||||
* @brief Check whether cache key exists
|
||||
*/
|
||||
static const bool cacheKeyExist( CacheMap* map, const OID oid, const uint64_t lbid )
|
||||
static bool cacheKeyExist( CacheMap* map, const OID oid, const uint64_t lbid )
|
||||
{
|
||||
CacheKey key = getCacheKey( oid, lbid );
|
||||
return map->find(key) == map->end() ? false : true;
|
||||
}
|
||||
static const bool cacheKeyExist( CacheMap* map, BlockBuffer* buffer )
|
||||
static bool cacheKeyExist( CacheMap* map, BlockBuffer* buffer )
|
||||
{
|
||||
return cacheKeyExist( map, (*buffer).cb.file.oid, (*buffer).block.lbid );
|
||||
}
|
||||
static const bool cacheKeyExist( const OID oid, const uint64_t lbid )
|
||||
static bool cacheKeyExist( const OID oid, const uint64_t lbid )
|
||||
{
|
||||
return cacheKeyExist( m_lruList, oid, lbid ) || cacheKeyExist( m_writeList, oid, lbid );
|
||||
}
|
||||
@ -127,7 +127,7 @@ public:
|
||||
/**
|
||||
* @brief Flush the write cache
|
||||
*/
|
||||
EXPORT static const int flushCache();
|
||||
EXPORT static int flushCache();
|
||||
|
||||
/**
|
||||
* @brief Get the cache key
|
||||
@ -142,7 +142,7 @@ public:
|
||||
return getCacheKey( (*buffer).cb.file.oid, (*buffer).block.lbid );
|
||||
}
|
||||
|
||||
EXPORT static const int getListSize( const CacheListType listType );
|
||||
EXPORT static int getListSize( const CacheListType listType );
|
||||
|
||||
/**
|
||||
* @brief Init the buffers
|
||||
@ -156,8 +156,8 @@ public:
|
||||
/**
|
||||
* @brief Insert into LRU list
|
||||
*/
|
||||
EXPORT static const int insertLRUList( CommBlock& cb, const uint64_t lbid, const uint64_t fbo, const unsigned char* buf );
|
||||
static const int insertLRUList( CommBlock& cb, const uint64_t lbid, const uint64_t fbo, const DataBlock& block )
|
||||
EXPORT static int insertLRUList( CommBlock& cb, const uint64_t lbid, const uint64_t fbo, const unsigned char* buf );
|
||||
static int insertLRUList( CommBlock& cb, const uint64_t lbid, const uint64_t fbo, const DataBlock& block )
|
||||
{
|
||||
return insertLRUList( cb, lbid, fbo, block.data );
|
||||
}
|
||||
@ -170,20 +170,20 @@ public:
|
||||
/**
|
||||
* @brief Load cache block to a buffer
|
||||
*/
|
||||
static const int loadCacheBlock( const CacheKey& key, DataBlock& block )
|
||||
static int loadCacheBlock( const CacheKey& key, DataBlock& block )
|
||||
{
|
||||
return loadCacheBlock( key, block.data );
|
||||
}
|
||||
EXPORT static const int loadCacheBlock( const CacheKey& key, unsigned char* buf );
|
||||
EXPORT static int loadCacheBlock( const CacheKey& key, unsigned char* buf );
|
||||
|
||||
/**
|
||||
* @brief Modify a cache block
|
||||
*/
|
||||
static const int modifyCacheBlock( const CacheKey& key, const DataBlock& block )
|
||||
static int modifyCacheBlock( const CacheKey& key, const DataBlock& block )
|
||||
{
|
||||
return modifyCacheBlock( key, block.data );
|
||||
}
|
||||
EXPORT static const int modifyCacheBlock( const CacheKey& key, const unsigned char* buf );
|
||||
EXPORT static int modifyCacheBlock( const CacheKey& key, const unsigned char* buf );
|
||||
|
||||
/**
|
||||
* @brief Print
|
||||
@ -194,14 +194,14 @@ public:
|
||||
/**
|
||||
* @brief Insert/Delete an element in cache map
|
||||
*/
|
||||
EXPORT static const int processCacheMap( CacheMap* map, BlockBuffer* buffer, OpType opType );
|
||||
EXPORT static int processCacheMap( CacheMap* map, BlockBuffer* buffer, OpType opType );
|
||||
|
||||
// accessory
|
||||
static const int getTotalBlock()
|
||||
static int getTotalBlock()
|
||||
{
|
||||
return m_cacheParam->totalBlock;
|
||||
}
|
||||
static const bool getUseCache()
|
||||
static bool getUseCache()
|
||||
{
|
||||
return m_useCache;
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ int DbFileOp::readDBFile( CommBlock& cb,
|
||||
* NO_ERROR if success
|
||||
* other number if something wrong
|
||||
***********************************************************/
|
||||
const int DbFileOp::readSubBlockEntry( IDBDataFile* pFile, DataBlock* block,
|
||||
int DbFileOp::readSubBlockEntry( IDBDataFile* pFile, DataBlock* block,
|
||||
const uint64_t lbid, const int sbid,
|
||||
const int entryNo, const int width,
|
||||
void* pStruct )
|
||||
@ -229,7 +229,7 @@ const int DbFileOp::readSubBlockEntry( IDBDataFile* pFile, DataBlock* block,
|
||||
}
|
||||
|
||||
|
||||
const int DbFileOp::readSubBlockEntry( CommBlock& cb, DataBlock* block,
|
||||
int DbFileOp::readSubBlockEntry( CommBlock& cb, DataBlock* block,
|
||||
const uint64_t lbid, const int sbid,
|
||||
const int entryNo, const int width,
|
||||
void* pStruct )
|
||||
@ -406,7 +406,7 @@ int DbFileOp::writeDBFileFbo(IDBDataFile* pFile, const unsigned char* writeBuf,
|
||||
* NO_ERROR if success
|
||||
* other number if something wrong
|
||||
***********************************************************/
|
||||
const int DbFileOp::writeSubBlockEntry( IDBDataFile* pFile, DataBlock* block,
|
||||
int DbFileOp::writeSubBlockEntry( IDBDataFile* pFile, DataBlock* block,
|
||||
const uint64_t lbid, const int sbid,
|
||||
const int entryNo, const int width,
|
||||
void* pStruct )
|
||||
@ -417,7 +417,7 @@ const int DbFileOp::writeSubBlockEntry( IDBDataFile* pFile, DataBlock* block,
|
||||
return writeDBFile( pFile, block->data, lbid );
|
||||
}
|
||||
|
||||
const int DbFileOp::writeSubBlockEntry( CommBlock& cb, DataBlock* block,
|
||||
int DbFileOp::writeSubBlockEntry( CommBlock& cb, DataBlock* block,
|
||||
const uint64_t lbid, const int sbid,
|
||||
const int entryNo, const int width,
|
||||
void* pStruct )
|
||||
@ -438,7 +438,7 @@ const int DbFileOp::writeSubBlockEntry( CommBlock& cb, DataBlock* block,
|
||||
* NO_ERROR if success
|
||||
* other number if something wrong
|
||||
***********************************************************/
|
||||
const int DbFileOp::writeVB( IDBDataFile* pFile, const OID oid, const uint64_t lbid )
|
||||
int DbFileOp::writeVB( IDBDataFile* pFile, const OID oid, const uint64_t lbid )
|
||||
{
|
||||
if ( !BRMWrapper::getUseVb() )
|
||||
return NO_ERROR;
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
* @brief Get an entry within a subblock and also populate block buffer
|
||||
*
|
||||
*/
|
||||
EXPORT const int readSubBlockEntry(IDBDataFile* pFile,
|
||||
EXPORT int readSubBlockEntry(IDBDataFile* pFile,
|
||||
DataBlock* block,
|
||||
const uint64_t lbid,
|
||||
const int sbid,
|
||||
@ -113,7 +113,7 @@ public:
|
||||
const int width,
|
||||
void* pStruct ) ;
|
||||
|
||||
EXPORT const int readSubBlockEntry(CommBlock& cb,
|
||||
EXPORT int readSubBlockEntry(CommBlock& cb,
|
||||
DataBlock* block,
|
||||
const uint64_t lbid,
|
||||
const int sbid,
|
||||
@ -196,7 +196,7 @@ public:
|
||||
/**
|
||||
* @brief Write a sub block entry directly to a DB file
|
||||
*/
|
||||
EXPORT const int writeSubBlockEntry(IDBDataFile* pFile,
|
||||
EXPORT int writeSubBlockEntry(IDBDataFile* pFile,
|
||||
DataBlock* block,
|
||||
const uint64_t lbid,
|
||||
const int sbid,
|
||||
@ -204,7 +204,7 @@ public:
|
||||
const int width,
|
||||
void* pStruct );
|
||||
|
||||
EXPORT const int writeSubBlockEntry(CommBlock& cb,
|
||||
EXPORT int writeSubBlockEntry(CommBlock& cb,
|
||||
DataBlock* block,
|
||||
const uint64_t lbid,
|
||||
const int sbid,
|
||||
@ -215,7 +215,7 @@ public:
|
||||
/**
|
||||
* @brief Write to version buffer
|
||||
*/
|
||||
EXPORT const int writeVB( IDBDataFile* pFile,
|
||||
EXPORT int writeVB( IDBDataFile* pFile,
|
||||
const OID oid,
|
||||
const uint64_t lbid );
|
||||
|
||||
|
@ -200,7 +200,7 @@ public:
|
||||
|
||||
/** @brief get the CurrentDBRootIdx
|
||||
*/
|
||||
inline const int getCurrentDBRootIdx()
|
||||
inline int getCurrentDBRootIdx()
|
||||
{
|
||||
boost::mutex::scoped_lock lock(fDBRootExtTrkMutex);
|
||||
return fCurrentDBRootIdx;
|
||||
|
@ -256,7 +256,7 @@ int FileOp::createFile(FID fid,
|
||||
BRM::LBID_t startLbid;
|
||||
uint32_t startBlock;
|
||||
RETURN_ON_ERROR( BRMWrapper::getInstance()->allocateColExtentExactFile(
|
||||
(const OID)fid, (uint32_t)width, dbRootx, partitionx, segment, colDataType,
|
||||
(OID)fid, (uint32_t)width, dbRootx, partitionx, segment, colDataType,
|
||||
startLbid, allocSize, startBlock) );
|
||||
|
||||
// We allocate a full extent from BRM, but only write an abbreviated 256K
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
/**
|
||||
* @brief Is it required to debug
|
||||
*/
|
||||
const bool isDebug( const DebugLevel level ) const
|
||||
bool isDebug( const DebugLevel level ) const
|
||||
{
|
||||
return level <= m_debugLevel;
|
||||
}
|
||||
@ -57,7 +57,7 @@ public:
|
||||
/**
|
||||
* @brief Get debug level
|
||||
*/
|
||||
const DebugLevel getDebugLevel() const
|
||||
DebugLevel getDebugLevel() const
|
||||
{
|
||||
return m_debugLevel;
|
||||
}
|
||||
|
Reference in New Issue
Block a user