You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
MCOL-4839: Fix clang build (#2102)
* Fix clang build * Extern C returned to plugin_instance Co-authored-by: Leonid Fedorov <l.fedorov@mail.corp.ru>
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
namespace WriteEngine
|
||||
{
|
||||
class Log;
|
||||
struct ColumnInfo;
|
||||
class ColumnInfo;
|
||||
|
||||
/** @brief A buffer class to store data written to column files
|
||||
*
|
||||
|
@@ -37,7 +37,7 @@
|
||||
namespace WriteEngine
|
||||
{
|
||||
class Log;
|
||||
struct ColumnInfo;
|
||||
class ColumnInfo;
|
||||
|
||||
/** @brief A buffer class to store data written to compressed column files
|
||||
*
|
||||
@@ -83,10 +83,10 @@ public:
|
||||
*
|
||||
* @param startOffset The buffer offset from where the write should begin
|
||||
* @param writeSize The number of bytes to be written to the file
|
||||
* @param fillUpWEmpties The flag to fill the buffer with empty magic
|
||||
* @param fillUpWEmpties The flag to fill the buffer with empty magic
|
||||
* values up to the block boundary.
|
||||
*/
|
||||
virtual int writeToFile(int startOffset, int writeSize,
|
||||
virtual int writeToFile(int startOffset, int writeSize,
|
||||
bool fillUpWEmpties = false);
|
||||
|
||||
private:
|
||||
|
@@ -40,7 +40,7 @@ namespace WriteEngine
|
||||
{
|
||||
class Log;
|
||||
|
||||
struct ColumnInfo;
|
||||
class ColumnInfo;
|
||||
|
||||
/**
|
||||
* ColumnBufferManager class provides the functionality for multiple threads to
|
||||
@@ -194,7 +194,7 @@ protected:
|
||||
* @param startOffset The buffer offset where the write should begin
|
||||
* @param writeSize The number of bytes to be written to the file
|
||||
* @param fillUpWEmpties The flag to fill the buffer with NULLs up to
|
||||
* the block boundary.
|
||||
* the block boundary.
|
||||
* @return success or fail status
|
||||
*/
|
||||
virtual int writeToFileExtentCheck(uint32_t startOffset, uint32_t writeSize,
|
||||
|
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace WriteEngine
|
||||
{
|
||||
struct ColumnInfo;
|
||||
class ColumnInfo;
|
||||
class Log;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
@@ -487,7 +487,7 @@ public:
|
||||
|
||||
public:
|
||||
friend class BulkLoad;
|
||||
friend struct ColumnInfo;
|
||||
friend class ColumnInfo;
|
||||
friend class ColumnInfoCompressed;
|
||||
|
||||
};
|
||||
|
@@ -165,18 +165,6 @@ struct QueueShutdown : public unary_function<T&, void>
|
||||
x.shutdown();
|
||||
}
|
||||
};
|
||||
|
||||
inline const string sin_addr2String(const in_addr src)
|
||||
{
|
||||
string s;
|
||||
#ifdef _MSC_VER
|
||||
s = inet_ntoa(src);
|
||||
#else
|
||||
char dst[INET_ADDRSTRLEN];
|
||||
s = inet_ntop(AF_INET, &src, dst, INET_ADDRSTRLEN);
|
||||
#endif
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
namespace WriteEngine
|
||||
|
@@ -58,12 +58,8 @@ namespace
|
||||
// variable name later (to remove the m_ prefix) as time allows.
|
||||
const uint16_t m_endHeader = DCTNRY_END_HEADER; // end of header flag (0xffff)
|
||||
const uint16_t m_offSetZero = BYTE_PER_BLOCK; // value for 0 offset (8192)
|
||||
const int m_lastOffSet = BYTE_PER_BLOCK; // end of last offset
|
||||
const int m_totalHdrBytes = // # bytes in header
|
||||
HDR_UNIT_SIZE + NEXT_PTR_BYTES + HDR_UNIT_SIZE + HDR_UNIT_SIZE;
|
||||
const int m_bigSpace = // free space in an empty block
|
||||
BYTE_PER_BLOCK - (m_totalHdrBytes + HDR_UNIT_SIZE);
|
||||
|
||||
const int START_HDR1 = // start loc of 2nd offset (HDR1)
|
||||
HDR_UNIT_SIZE + NEXT_PTR_BYTES + HDR_UNIT_SIZE;
|
||||
const int PSEUDO_COL_WIDTH = DICT_COL_WIDTH; // used to convert row count to block count
|
||||
|
@@ -75,9 +75,6 @@ using namespace idbdatafile;
|
||||
namespace redistribute
|
||||
{
|
||||
|
||||
// need be consistent with we_config.cpp
|
||||
const unsigned DEFAULT_FILES_PER_COLUMN_PARTITION = 4;
|
||||
|
||||
// static variables
|
||||
boost::mutex RedistributeWorkerThread::fActionMutex;
|
||||
volatile bool RedistributeWorkerThread::fStopAction = false;
|
||||
|
@@ -19,7 +19,6 @@
|
||||
// $Id: we_dmlcommandproc.cpp 3082 2011-09-26 22:00:38Z chao $
|
||||
|
||||
#include <unistd.h>
|
||||
using namespace std;
|
||||
#include "bytestream.h"
|
||||
using namespace messageqcpp;
|
||||
|
||||
@@ -54,6 +53,8 @@ using namespace BRM;
|
||||
#include "checks.h"
|
||||
#include "columnwidth.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace WriteEngine
|
||||
{
|
||||
//StopWatch timer;
|
||||
@@ -1897,7 +1898,8 @@ uint8_t WE_DMLCommandProc::processBatchInsertBinary(messageqcpp::ByteStream& bs,
|
||||
bs >> val64;
|
||||
memcpy(&valD, &val64, 8);
|
||||
|
||||
if (valD < 0.0 && valD != joblist::DOUBLEEMPTYROW && valD != joblist::DOUBLENULL)
|
||||
if (valD < 0.0 && valD != static_cast<double>(joblist::DOUBLEEMPTYROW)
|
||||
&& valD != static_cast<double>(joblist::DOUBLENULL))
|
||||
{
|
||||
valD = 0.0;
|
||||
pushWarning = true;
|
||||
@@ -1915,7 +1917,8 @@ uint8_t WE_DMLCommandProc::processBatchInsertBinary(messageqcpp::ByteStream& bs,
|
||||
bs >> val32;
|
||||
memcpy(&valF, &val32, 4);
|
||||
|
||||
if (valF < 0.0 && valF != joblist::FLOATEMPTYROW && valF != joblist::FLOATNULL)
|
||||
if (valF < 0.0 && valF != static_cast<float>(joblist::FLOATEMPTYROW)
|
||||
&& valF != static_cast<float>(joblist::FLOATNULL))
|
||||
{
|
||||
valF = 0.0;
|
||||
pushWarning = true;
|
||||
@@ -2585,7 +2588,7 @@ uint8_t WE_DMLCommandProc::rollbackBatchAutoOn(messageqcpp::ByteStream& bs, std:
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
err = "No such table for oid " + tableOid;
|
||||
err = std::string("No such table for oid ") + std::to_string(tableOid);
|
||||
rc = 1;
|
||||
return rc;
|
||||
}
|
||||
@@ -2813,7 +2816,7 @@ uint8_t WE_DMLCommandProc::processUpdate(messageqcpp::ByteStream& bs,
|
||||
}
|
||||
|
||||
int rrid = (int) relativeRID / (BYTE_PER_BLOCK / colWidth);
|
||||
// populate stats.blocksChanged
|
||||
// populate stats.blocksChanged
|
||||
if (rrid > preBlkNums[j])
|
||||
{
|
||||
preBlkNums[j] = rrid ;
|
||||
@@ -3847,7 +3850,7 @@ uint8_t WE_DMLCommandProc::processFlushFiles(messageqcpp::ByteStream& bs, std::s
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
err = "Systemcatalog error for tableoid " + tableOid;
|
||||
err = std::string("Systemcatalog error for tableoid ") + std::to_string(tableOid);
|
||||
rc = 1;
|
||||
return rc;
|
||||
}
|
||||
|
@@ -111,7 +111,7 @@ public:
|
||||
{
|
||||
log(logging::LOG_TYPE_CRITICAL, strerror(errno));
|
||||
}
|
||||
void ParentLogChildMessage(const std::string &str)
|
||||
void ParentLogChildMessage(const std::string &str) override
|
||||
{
|
||||
log(logging::LOG_TYPE_INFO, str);
|
||||
}
|
||||
|
@@ -146,7 +146,7 @@ std::string WECmdArgs::getCpImportCmdLine()
|
||||
else if (0 == fLocFile.length()) //No filename given, from job file
|
||||
aSS << " -f " << fPmFilePath;
|
||||
}
|
||||
|
||||
|
||||
if (fErrorDir.length() > 0)
|
||||
aSS << " -L " << fErrorDir;
|
||||
|
||||
@@ -957,7 +957,7 @@ void WECmdArgs::parseCmdLineArgs(int argc, char** argv)
|
||||
|
||||
default:
|
||||
{
|
||||
std::string aErr = "Unknown command line option " + aCh;
|
||||
std::string aErr = std::string("Unknown command line option ") + std::to_string(aCh);
|
||||
//cout << "Unknown command line option " << aCh << endl;
|
||||
throw (runtime_error(aErr));
|
||||
}
|
||||
@@ -1256,7 +1256,7 @@ void WECmdArgs::parseCmdLineArgs(int argc, char** argv)
|
||||
throw (runtime_error("No schema or local filename specified."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* check for all-or-nothing cmdline args to enable S3 import */
|
||||
int s3Tmp = (fS3Key.empty() ? 0 : 1) + (fS3Bucket.empty() ? 0 : 1) +
|
||||
(fS3Secret.empty() ? 0 : 1) + (fS3Region.empty() ? 0 : 1);
|
||||
@@ -1551,7 +1551,7 @@ unsigned int WECmdArgs::getBatchQuantity()
|
||||
|
||||
void WECmdArgs::setEnclByAndEscCharFromJobFile(std::string& JobName)
|
||||
{
|
||||
if ((fEnclosedChar == 0)) // check anything in Jobxml file
|
||||
if (fEnclosedChar == 0) // check anything in Jobxml file
|
||||
{
|
||||
WEXmlgetter aXmlGetter(JobName);
|
||||
vector<string> aSections;
|
||||
|
@@ -742,7 +742,7 @@ void WESDHandler::setup()
|
||||
else
|
||||
{
|
||||
std::string aStr;
|
||||
aStr = "Encountered NULL WESplClient : " + PmId;
|
||||
aStr = std::string("Encountered NULL WESplClient : ") + std::to_string(PmId);
|
||||
cout << aStr << endl;
|
||||
fLog.logMsg( aStr, MSGLVL_ERROR );
|
||||
throw WESdHandlerException(aStr);
|
||||
@@ -974,7 +974,7 @@ void WESDHandler::checkForConnections()
|
||||
if (aNow - fWeSplClients[PmId]->getLastInTime() > 180)
|
||||
{
|
||||
std::string aStr;
|
||||
aStr = "Heartbeats missed - Non Responsive PM" + PmId;
|
||||
aStr = std::string("Heartbeats missed - Non Responsive PM") + std::to_string(PmId);
|
||||
fLog.logMsg( aStr, MSGLVL_ERROR );
|
||||
fWeSplClients[PmId]->onDisconnect();
|
||||
exit(1); //Otherwise; have to wait till write() comes out
|
||||
|
@@ -78,7 +78,7 @@ XMLGenData::XMLGenData( )
|
||||
br = Config::getBulkRoot();
|
||||
boost::filesystem::path p(br);
|
||||
#else
|
||||
boost::filesystem::path p( std::string(Config::getBulkRoot()) );
|
||||
boost::filesystem::path p{ std::string(Config::getBulkRoot()) };
|
||||
#endif
|
||||
p /= JOBDIR;
|
||||
fParms.insert(ParmList::value_type(PATH, p.string()));
|
||||
|
Reference in New Issue
Block a user