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

Reformat all code to coding standard

This commit is contained in:
Andrew Hutchings
2017-10-26 17:18:17 +01:00
parent 4985f3456e
commit 01446d1e22
1296 changed files with 403852 additions and 353747 deletions

View File

@ -52,86 +52,86 @@ namespace WriteEngine
class WE_DMLCommandProc
{
public:
typedef std::vector<std::string> ColValues;
EXPORT WE_DMLCommandProc();
EXPORT WE_DMLCommandProc(const WE_DMLCommandProc& rhs);
EXPORT ~WE_DMLCommandProc();
inline void isFirstBatchPm (bool firstBatch)
{
fIsFirstBatchPm = firstBatch;
}
inline bool isFirstBatchPm ()
{
return fIsFirstBatchPm;
}
//Convert rid from logical block rid to file relative rid
inline void convertToRelativeRid (uint64_t& rid, const uint8_t extentNum, const uint16_t blockNum)
{
rid = rid + extentNum*extentRows + blockNum * 8192;
}
EXPORT uint8_t processSingleInsert(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t commitVersion(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t rollbackBlocks(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t rollbackVersion(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t processBatchInsert(messageqcpp::ByteStream& bs, std::string & err, ByteStream::quadbyte & PMId);
EXPORT uint8_t processBatchInsertBinary(messageqcpp::ByteStream& bs, std::string & err, ByteStream::quadbyte & PMId);
EXPORT uint8_t commitBatchAutoOn(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t commitBatchAutoOff(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t rollbackBatchAutoOn(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t rollbackBatchAutoOff(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t processBatchInsertHwm(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t processUpdate(messageqcpp::ByteStream& bs, std::string & err, ByteStream::quadbyte & PMId, uint64_t& blocksChanged);
EXPORT uint8_t processUpdate1(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t processFlushFiles(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t processDelete(messageqcpp::ByteStream& bs, std::string & err, ByteStream::quadbyte & PMId, uint64_t& blocksChanged);
EXPORT uint8_t processRemoveMeta(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t processBulkRollback(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t processBulkRollbackCleanup(messageqcpp::ByteStream& bs, std::string & err);
EXPORT uint8_t updateSyscolumnNextval(ByteStream& bs, std::string & err);
EXPORT uint8_t processPurgeFDCache(ByteStream& bs, std::string & err);
EXPORT uint8_t processEndTransaction(ByteStream& bs, std::string & err);
EXPORT uint8_t processFixRows(ByteStream& bs, std::string & err, ByteStream::quadbyte & PMId);
EXPORT uint8_t getWrittenLbids(messageqcpp::ByteStream& bs, std::string & err, ByteStream::quadbyte & PMId);
int validateColumnHWMs(
execplan::CalpontSystemCatalog::RIDList& ridList,
boost::shared_ptr<execplan::CalpontSystemCatalog> systemCatalogPtr,
const std::vector<DBRootExtentInfo>& segFileInfo,
const char* stage );
private:
WriteEngineWrapper fWEWrapper;
boost::scoped_ptr<RBMetaWriter> fRBMetaWriter;
std::vector<boost::shared_ptr<DBRootExtentTracker> > dbRootExtTrackerVec;
inline bool isDictCol ( execplan::CalpontSystemCatalog::ColType colType )
{
if (((colType.colDataType == execplan::CalpontSystemCatalog::CHAR) && (colType.colWidth > 8))
|| ((colType.colDataType == execplan::CalpontSystemCatalog::VARCHAR) && (colType.colWidth > 7))
|| ((colType.colDataType == execplan::CalpontSystemCatalog::DECIMAL) && (colType.precision > 18))
|| ((colType.colDataType == execplan::CalpontSystemCatalog::UDECIMAL) && (colType.precision > 18))
|| (colType.colDataType == execplan::CalpontSystemCatalog::VARBINARY)
public:
typedef std::vector<std::string> ColValues;
EXPORT WE_DMLCommandProc();
EXPORT WE_DMLCommandProc(const WE_DMLCommandProc& rhs);
EXPORT ~WE_DMLCommandProc();
inline void isFirstBatchPm (bool firstBatch)
{
fIsFirstBatchPm = firstBatch;
}
inline bool isFirstBatchPm ()
{
return fIsFirstBatchPm;
}
//Convert rid from logical block rid to file relative rid
inline void convertToRelativeRid (uint64_t& rid, const uint8_t extentNum, const uint16_t blockNum)
{
rid = rid + extentNum * extentRows + blockNum * 8192;
}
EXPORT uint8_t processSingleInsert(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t commitVersion(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t rollbackBlocks(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t rollbackVersion(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t processBatchInsert(messageqcpp::ByteStream& bs, std::string& err, ByteStream::quadbyte& PMId);
EXPORT uint8_t processBatchInsertBinary(messageqcpp::ByteStream& bs, std::string& err, ByteStream::quadbyte& PMId);
EXPORT uint8_t commitBatchAutoOn(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t commitBatchAutoOff(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t rollbackBatchAutoOn(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t rollbackBatchAutoOff(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t processBatchInsertHwm(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t processUpdate(messageqcpp::ByteStream& bs, std::string& err, ByteStream::quadbyte& PMId, uint64_t& blocksChanged);
EXPORT uint8_t processUpdate1(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t processFlushFiles(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t processDelete(messageqcpp::ByteStream& bs, std::string& err, ByteStream::quadbyte& PMId, uint64_t& blocksChanged);
EXPORT uint8_t processRemoveMeta(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t processBulkRollback(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t processBulkRollbackCleanup(messageqcpp::ByteStream& bs, std::string& err);
EXPORT uint8_t updateSyscolumnNextval(ByteStream& bs, std::string& err);
EXPORT uint8_t processPurgeFDCache(ByteStream& bs, std::string& err);
EXPORT uint8_t processEndTransaction(ByteStream& bs, std::string& err);
EXPORT uint8_t processFixRows(ByteStream& bs, std::string& err, ByteStream::quadbyte& PMId);
EXPORT uint8_t getWrittenLbids(messageqcpp::ByteStream& bs, std::string& err, ByteStream::quadbyte& PMId);
int validateColumnHWMs(
execplan::CalpontSystemCatalog::RIDList& ridList,
boost::shared_ptr<execplan::CalpontSystemCatalog> systemCatalogPtr,
const std::vector<DBRootExtentInfo>& segFileInfo,
const char* stage );
private:
WriteEngineWrapper fWEWrapper;
boost::scoped_ptr<RBMetaWriter> fRBMetaWriter;
std::vector<boost::shared_ptr<DBRootExtentTracker> > dbRootExtTrackerVec;
inline bool isDictCol ( execplan::CalpontSystemCatalog::ColType colType )
{
if (((colType.colDataType == execplan::CalpontSystemCatalog::CHAR) && (colType.colWidth > 8))
|| ((colType.colDataType == execplan::CalpontSystemCatalog::VARCHAR) && (colType.colWidth > 7))
|| ((colType.colDataType == execplan::CalpontSystemCatalog::DECIMAL) && (colType.precision > 18))
|| ((colType.colDataType == execplan::CalpontSystemCatalog::UDECIMAL) && (colType.precision > 18))
|| (colType.colDataType == execplan::CalpontSystemCatalog::VARBINARY)
|| (colType.colDataType == execplan::CalpontSystemCatalog::BLOB)
|| (colType.colDataType == execplan::CalpontSystemCatalog::TEXT))
{
return true;
}
else
return false;
}
uint8_t processBatchInsertHwmFlushChunks(uint32_t tableOID, int txnID,
const std::vector<BRM::FileInfo>& files,
const std::vector<BRM::OID_t>& oidsToFlush,
std::string& err);
{
return true;
}
else
return false;
}
uint8_t processBatchInsertHwmFlushChunks(uint32_t tableOID, int txnID,
const std::vector<BRM::FileInfo>& files,
const std::vector<BRM::OID_t>& oidsToFlush,
std::string& err);
bool fIsFirstBatchPm;
std::map<uint32_t,rowgroup::RowGroup *> rowGroups;
std::map<uint32_t, dmlpackage::UpdateDMLPackage> cpackages;
BRM::DBRM fDbrm;
unsigned extentsPerSegmentFile, extentRows, filesPerColumnPartition, dbrootCnt;
Log fLog;
bool fIsFirstBatchPm;
std::map<uint32_t, rowgroup::RowGroup*> rowGroups;
std::map<uint32_t, dmlpackage::UpdateDMLPackage> cpackages;
BRM::DBRM fDbrm;
unsigned extentsPerSegmentFile, extentRows, filesPerColumnPartition, dbrootCnt;
Log fLog;
};
}