You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
chore(build): fixes to satisfy clang19 warnings
This commit is contained in:
committed by
Leonid Fedorov
parent
9fd7f342a7
commit
a0bee173f6
@ -125,10 +125,8 @@ void printUsage()
|
||||
cout << " Positional parameters:" << endl
|
||||
<< " dbName Name of database to load" << endl
|
||||
<< " tblName Name of table to load" << endl
|
||||
<< " loadFile Optional input file name in current directory, "
|
||||
<< "unless a fully" << endl
|
||||
<< " qualified name is given. If not given, "
|
||||
<< "input read from stdin." << endl
|
||||
<< " loadFile Optional input file name in current directory, " << "unless a fully" << endl
|
||||
<< " qualified name is given. If not given, " << "input read from stdin." << endl
|
||||
<< endl;
|
||||
|
||||
cout << " Options:" << endl
|
||||
@ -158,8 +156,7 @@ void printUsage()
|
||||
<< " -w Number of parsers" << endl
|
||||
<< " -B I/O library read buffer size (in bytes)" << endl
|
||||
<< " -E Enclosed by character if field values are enclosed" << endl
|
||||
<< " -C Escape character used in conjunction with 'enclosed by' "
|
||||
<< "character," << endl
|
||||
<< " -C Escape character used in conjunction with 'enclosed by' " << "character," << endl
|
||||
<< " or as part of NULL escape sequence ('\\N'); default is '\\'" << endl
|
||||
<< " -I Binary import; binaryOpt 1-import NULL values" << endl
|
||||
<< " 2-saturate NULL values" << endl
|
||||
@ -191,7 +188,7 @@ void printUsage()
|
||||
//------------------------------------------------------------------------------
|
||||
// Signal handler to catch SIGTERM signal to terminate the process
|
||||
//------------------------------------------------------------------------------
|
||||
void handleSigTerm(int i)
|
||||
void handleSigTerm(int /*i*/)
|
||||
{
|
||||
BRMWrapper::getInstance()->finishCpimportJob(cpimportJobId);
|
||||
std::cout << "Received SIGTERM to terminate the process..." << std::endl;
|
||||
@ -201,7 +198,7 @@ void handleSigTerm(int i)
|
||||
//------------------------------------------------------------------------------
|
||||
// Signal handler to catch Control-C signal to terminate the process
|
||||
//------------------------------------------------------------------------------
|
||||
void handleControlC(int i)
|
||||
void handleControlC(int /*i*/)
|
||||
{
|
||||
BRMWrapper::getInstance()->finishCpimportJob(cpimportJobId);
|
||||
if (!BulkLoad::disableConsoleOutput())
|
||||
@ -213,7 +210,7 @@ void handleControlC(int i)
|
||||
//------------------------------------------------------------------------------
|
||||
// Signal handler to catch SIGTERM signal to terminate the process
|
||||
//------------------------------------------------------------------------------
|
||||
void handleSigSegv(int i)
|
||||
void handleSigSegv(int /*i*/)
|
||||
{
|
||||
BRMWrapper::getInstance()->finishCpimportJob(cpimportJobId);
|
||||
std::cout << "Received SIGSEGV to terminate the process..." << std::endl;
|
||||
@ -223,7 +220,7 @@ void handleSigSegv(int i)
|
||||
//------------------------------------------------------------------------------
|
||||
// Signal handler to catch SIGTERM signal to terminate the process
|
||||
//------------------------------------------------------------------------------
|
||||
void handleSigAbrt(int i)
|
||||
void handleSigAbrt(int /*i*/)
|
||||
{
|
||||
BRMWrapper::getInstance()->finishCpimportJob(cpimportJobId);
|
||||
std::cout << "Received SIGABRT to terminate the process..." << std::endl;
|
||||
@ -308,7 +305,6 @@ void setupSignalHandlers()
|
||||
memset(&act, 0, sizeof(act));
|
||||
act.sa_handler = handleSigAbrt;
|
||||
sigaction(SIGABRT, &act, 0);
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -523,8 +519,7 @@ void parseCmdLineArgs(int argc, char** argv, BulkLoad& curJob, std::string& sJob
|
||||
delim = '\t';
|
||||
|
||||
if (!BulkLoad::disableConsoleOutput())
|
||||
cout << "Column delimiter : "
|
||||
<< "\\t" << endl;
|
||||
cout << "Column delimiter : " << "\\t" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -903,15 +898,15 @@ void getTableOID(const std::string& xmlGenSchema, const std::string& xmlGenTable
|
||||
catch (std::exception& ex)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Unable to set default JobID; "
|
||||
<< "Error getting OID for table " << tbl.schema << '.' << tbl.table << ": " << ex.what();
|
||||
oss << "Unable to set default JobID; " << "Error getting OID for table " << tbl.schema << '.' << tbl.table
|
||||
<< ": " << ex.what();
|
||||
startupError(oss.str(), false);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Unable to set default JobID; "
|
||||
<< "Unknown error getting OID for table " << tbl.schema << '.' << tbl.table;
|
||||
oss << "Unable to set default JobID; " << "Unknown error getting OID for table " << tbl.schema << '.'
|
||||
<< tbl.table;
|
||||
startupError(oss.str(), false);
|
||||
}
|
||||
|
||||
|
@ -902,7 +902,7 @@ int BulkLoad::preProcessAutoInc(const std::string& fullTableName, ColumnInfo* co
|
||||
// NO_ERROR if success
|
||||
// other if fail
|
||||
//------------------------------------------------------------------------------
|
||||
int BulkLoad::preProcessHwmLbid(const ColumnInfo* info, int minWidth, uint32_t partition, uint16_t segment,
|
||||
int BulkLoad::preProcessHwmLbid(const ColumnInfo* info, int /*minWidth*/, uint32_t partition, uint16_t segment,
|
||||
HWM& hwm, // input/output
|
||||
BRM::LBID_t& lbid, // output
|
||||
bool& bSkippedToNewExtent) // output
|
||||
|
@ -51,7 +51,7 @@ int ColumnBuffer::finishFile(bool /*bTruncFile*/)
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
int ColumnBuffer::resetToBeCompressedColBuf(long long& startFileOffset)
|
||||
int ColumnBuffer::resetToBeCompressedColBuf(long long& /*startFileOffset*/)
|
||||
{
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
@ -139,27 +139,27 @@ class ColExtInfBase
|
||||
ColExtInfBase() = default;
|
||||
virtual ~ColExtInfBase() = default;
|
||||
|
||||
virtual void addFirstEntry(RID lastInputRow, BRM::LBID_t lbid, bool bIsNewExtent)
|
||||
virtual void addFirstEntry(RID /*lastInputRow*/, BRM::LBID_t /*lbid*/, bool /*bIsNewExtent*/)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void addOrUpdateEntry(RID lastInputRow, int64_t minVal, int64_t maxVal, ColDataType colDataType,
|
||||
int width)
|
||||
virtual void addOrUpdateEntry(RID /*lastInputRow*/, int64_t /*minVal*/, int64_t /*maxVal*/, ColDataType /*colDataType*/,
|
||||
int /*width*/)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void addOrUpdateEntry(RID lastInputRow, int128_t minVal, int128_t maxVal, ColDataType colDataType,
|
||||
int width)
|
||||
virtual void addOrUpdateEntry(RID /*lastInputRow*/, int128_t /*minVal*/, int128_t /*maxVal*/, ColDataType /*colDataType*/,
|
||||
int /*width*/)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void getCPInfoForBRM(JobColumn column, BRMReporter& brmReporter)
|
||||
virtual void getCPInfoForBRM(JobColumn /*column*/, BRMReporter& /*brmReporter*/)
|
||||
{
|
||||
}
|
||||
virtual void print(const JobColumn& column)
|
||||
virtual void print(const JobColumn& /*column*/)
|
||||
{
|
||||
}
|
||||
virtual int updateEntryLbid(BRM::LBID_t startLbid)
|
||||
virtual int updateEntryLbid(BRM::LBID_t /*startLbid*/)
|
||||
{
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ ColumnOpBulk::~ColumnOpBulk()
|
||||
// @bug 5572 - HDFS usage: add *.tmp file backup flag
|
||||
IDBDataFile* ColumnOpBulk::openFile(const WriteEngine::Column& column, uint16_t dbRoot, uint32_t partition,
|
||||
uint16_t segment, std::string& segFile, bool useTmpSuffix,
|
||||
const char* mode, int ioBuffSize, bool isReadOnly) const
|
||||
const char* mode, int /*ioBuffSize*/, bool /*isReadOnly*/) const
|
||||
{
|
||||
return FileOp::openFile(column.dataFile.fid, dbRoot, partition, segment, segFile, mode, column.colWidth,
|
||||
useTmpSuffix);
|
||||
|
@ -49,7 +49,7 @@ using namespace BRM;
|
||||
#include "cacheutils.h"
|
||||
using namespace idbdatafile;
|
||||
#include "checks.h"
|
||||
#include "utils_utf8.h" // for utf8_truncate_point()
|
||||
#include "utils_utf8.h" // for utf8_truncate_point()
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -764,8 +764,7 @@ int Dctnry::insertDctnry2(Signature& sig)
|
||||
* failure - it did not write the header to block
|
||||
******************************************************************************/
|
||||
int Dctnry::insertDctnry(const char* buf, ColPosPair** pos, const int totalRow, const int col, char* tokenBuf,
|
||||
long long& truncCount, const CHARSET_INFO* cs,
|
||||
const WriteEngine::ColType& weType)
|
||||
long long& truncCount, const CHARSET_INFO* cs, const WriteEngine::ColType& weType)
|
||||
{
|
||||
#ifdef PROFILE
|
||||
Stats::startParseEvent(WE_STATS_PARSE_DCT);
|
||||
@ -854,7 +853,7 @@ int Dctnry::insertDctnry(const char* buf, ColPosPair** pos, const int totalRow,
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* start = (const char*) curSig.signature;
|
||||
const char* start = (const char*)curSig.signature;
|
||||
const char* end = (const char*)(curSig.signature + curSig.size);
|
||||
size_t numChars = cs->numchars(start, end);
|
||||
size_t maxCharLength = m_colWidth / cs->mbmaxlen;
|
||||
@ -868,7 +867,7 @@ int Dctnry::insertDctnry(const char* buf, ColPosPair** pos, const int totalRow,
|
||||
}
|
||||
}
|
||||
}
|
||||
else // cs->mbmaxlen == 1
|
||||
else // cs->mbmaxlen == 1
|
||||
{
|
||||
if (curSig.size > m_colWidth)
|
||||
{
|
||||
@ -1033,7 +1032,7 @@ int Dctnry::insertDctnry(const char* buf, ColPosPair** pos, const int totalRow,
|
||||
}
|
||||
}
|
||||
} // if next
|
||||
} // end while
|
||||
} // end while
|
||||
|
||||
#ifdef PROFILE
|
||||
Stats::stopParseEvent(WE_STATS_PARSE_DCT);
|
||||
@ -1467,7 +1466,7 @@ IDBDataFile* Dctnry::openDctnryFile(bool useTmpSuffix)
|
||||
/*******************************************************************************
|
||||
* close dictionary file
|
||||
******************************************************************************/
|
||||
void Dctnry::closeDctnryFile(bool doFlush, std::map<FID, FID>& oids)
|
||||
void Dctnry::closeDctnryFile(bool /*doFlush*/, std::map<FID, FID>& /*oids*/)
|
||||
{
|
||||
closeFile(m_dFile);
|
||||
m_dFile = NULL;
|
||||
|
@ -170,7 +170,7 @@ int RedistributeControl::handleUIMsg(messageqcpp::ByteStream& bs, messageqcpp::I
|
||||
return status;
|
||||
}
|
||||
|
||||
int RedistributeControl::handleStartMsg(messageqcpp::ByteStream& bs, messageqcpp::IOSocket& so)
|
||||
int RedistributeControl::handleStartMsg(messageqcpp::ByteStream& bs, messageqcpp::IOSocket& /*so*/)
|
||||
{
|
||||
ostringstream oss;
|
||||
uint32_t status = getCurrentState();
|
||||
@ -236,7 +236,7 @@ int RedistributeControl::handleStartMsg(messageqcpp::ByteStream& bs, messageqcpp
|
||||
return status;
|
||||
}
|
||||
|
||||
int RedistributeControl::handleStatusMsg(messageqcpp::ByteStream&, messageqcpp::IOSocket& so)
|
||||
int RedistributeControl::handleStatusMsg(messageqcpp::ByteStream&, messageqcpp::IOSocket& /*so*/)
|
||||
{
|
||||
ostringstream oss;
|
||||
uint32_t status = getCurrentState();
|
||||
@ -329,7 +329,7 @@ int RedistributeControl::handleStatusMsg(messageqcpp::ByteStream&, messageqcpp::
|
||||
return status;
|
||||
}
|
||||
|
||||
int RedistributeControl::handleStopMsg(messageqcpp::ByteStream&, messageqcpp::IOSocket& so)
|
||||
int RedistributeControl::handleStopMsg(messageqcpp::ByteStream&, messageqcpp::IOSocket& /*so*/)
|
||||
{
|
||||
ostringstream oss;
|
||||
uint32_t status = getCurrentState();
|
||||
@ -353,7 +353,7 @@ int RedistributeControl::handleStopMsg(messageqcpp::ByteStream&, messageqcpp::IO
|
||||
return status;
|
||||
}
|
||||
|
||||
int RedistributeControl::handleClearMsg(messageqcpp::ByteStream&, messageqcpp::IOSocket& so)
|
||||
int RedistributeControl::handleClearMsg(messageqcpp::ByteStream&, messageqcpp::IOSocket& /*so*/)
|
||||
{
|
||||
ostringstream oss;
|
||||
uint32_t status = getCurrentState();
|
||||
|
@ -1434,7 +1434,7 @@ void RedistributeWorkerThread::handleDataFinish(SBS& sbs, size_t& size)
|
||||
fIOSocket.write(fBs);
|
||||
}
|
||||
|
||||
void RedistributeWorkerThread::handleDataCommit(SBS& sbs, size_t& size)
|
||||
void RedistributeWorkerThread::handleDataCommit(SBS& sbs, size_t& /*size*/)
|
||||
{
|
||||
size_t ack = 0;
|
||||
sbs.reset();
|
||||
@ -1446,7 +1446,7 @@ void RedistributeWorkerThread::handleDataCommit(SBS& sbs, size_t& size)
|
||||
fIOSocket.write(fBs);
|
||||
}
|
||||
|
||||
void RedistributeWorkerThread::handleDataAbort(SBS& sbs, size_t& size)
|
||||
void RedistributeWorkerThread::handleDataAbort(SBS& sbs, size_t& /*size*/)
|
||||
{
|
||||
// close open file
|
||||
if (fNewFilePtr != NULL)
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <cerrno>
|
||||
|
||||
#include <unistd.h> //pipe() && fork()
|
||||
#include <wait.h> //wait()
|
||||
#include <wait.h> //wait()
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
@ -166,7 +166,7 @@ void WEDataLoader::setupSignalHandlers()
|
||||
//------------------------------------------------------------------------------
|
||||
// handles on signal Terminate
|
||||
//------------------------------------------------------------------------------
|
||||
void WEDataLoader::onSigChild(int aInt)
|
||||
void WEDataLoader::onSigChild(int /*aInt*/)
|
||||
{
|
||||
std::string aStr = "Received SIGCHLD of terminated process..";
|
||||
cout << aStr << endl;
|
||||
@ -187,7 +187,7 @@ void WEDataLoader::onSigChild(int aInt)
|
||||
*
|
||||
**/
|
||||
|
||||
bool WEDataLoader::update(Subject* pSub)
|
||||
bool WEDataLoader::update(Subject* /*pSub*/)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -232,8 +232,7 @@ bool WEDataLoader::setupCpimport() // fork the cpimport
|
||||
close(fFIFO[1]); // close the WRITER of CHILD
|
||||
|
||||
cout << "Child Process Info: PID = " << getpid() << " (fFIFO[0], fFIFO[1]) = (" << fFIFO[0] << ","
|
||||
<< fFIFO[1] << ")"
|
||||
<< " (StartFD, EndFD) = (" << aStartFD << "," << aEndFD << ")" << endl;
|
||||
<< fFIFO[1] << ")" << " (StartFD, EndFD) = (" << aStartFD << "," << aEndFD << ")" << endl;
|
||||
|
||||
std::vector<char*> Cmds;
|
||||
// str2Argv(fCmdLineStr, Cmds); // to avoid out-of-scope problem
|
||||
@ -282,8 +281,8 @@ bool WEDataLoader::setupCpimport() // fork the cpimport
|
||||
cout.flush();
|
||||
close(fFIFO[0]); // will trigger an EOF on stdin
|
||||
ostringstream oss;
|
||||
oss << getObjId() << " : execv error: cpimport.bin invocation failed; "
|
||||
<< "(errno-" << errno << "); " << strerror(execvErrno) << "; Check file and try invoking locally.";
|
||||
oss << getObjId() << " : execv error: cpimport.bin invocation failed; " << "(errno-" << errno << "); "
|
||||
<< strerror(execvErrno) << "; Check file and try invoking locally.";
|
||||
logging::Message::Args errMsgArgs;
|
||||
errMsgArgs.add(oss.str());
|
||||
fpSysLog->logMsg(errMsgArgs, logging::LOG_TYPE_ERROR, logging::M0000);
|
||||
@ -913,7 +912,7 @@ void WEDataLoader::onReceiveData(ByteStream& Ibs)
|
||||
* @brief trigger when a EOD arrives.
|
||||
* @param Incoming ByteStream; not relevent for now
|
||||
*/
|
||||
void WEDataLoader::onReceiveEod(ByteStream& Ibs)
|
||||
void WEDataLoader::onReceiveEod(ByteStream& /*Ibs*/)
|
||||
{
|
||||
if (fpSysLog)
|
||||
{
|
||||
@ -1063,7 +1062,7 @@ void WEDataLoader::onReceiveMode(ByteStream& Ibs)
|
||||
* @param Incoming ByteStream, not relevant for now
|
||||
*/
|
||||
|
||||
void WEDataLoader::onReceiveAck(ByteStream& Ibs)
|
||||
void WEDataLoader::onReceiveAck(ByteStream& /*Ibs*/)
|
||||
{
|
||||
// All is good
|
||||
// update the status
|
||||
@ -1074,7 +1073,7 @@ void WEDataLoader::onReceiveAck(ByteStream& Ibs)
|
||||
* @brief Can make use to update the BRM
|
||||
* @param Incoming ByteStream, not relevant for now
|
||||
*/
|
||||
void WEDataLoader::onReceiveNak(ByteStream& Ibs)
|
||||
void WEDataLoader::onReceiveNak(ByteStream& /*Ibs*/)
|
||||
{
|
||||
// TODO - handle the problem
|
||||
}
|
||||
@ -1084,7 +1083,7 @@ void WEDataLoader::onReceiveNak(ByteStream& Ibs)
|
||||
* @brief Can make use to update the BRM
|
||||
* @param Incoming ByteStream, not relevant for now
|
||||
*/
|
||||
void WEDataLoader::onReceiveError(ByteStream& Ibs)
|
||||
void WEDataLoader::onReceiveError(ByteStream& /*Ibs*/)
|
||||
{
|
||||
// TODO - handle the failure situation.
|
||||
}
|
||||
@ -1597,7 +1596,7 @@ void WEDataLoader::sendDataRequest()
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void WEDataLoader::serialize(messageqcpp::ByteStream& b) const
|
||||
void WEDataLoader::serialize(messageqcpp::ByteStream& /*b*/) const
|
||||
{
|
||||
// TODO to be changed. left it here to understand how to implement
|
||||
/*
|
||||
@ -1612,7 +1611,7 @@ void WEDataLoader::serialize(messageqcpp::ByteStream& b) const
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void WEDataLoader::unserialize(messageqcpp::ByteStream& b)
|
||||
void WEDataLoader::unserialize(messageqcpp::ByteStream& /*b*/)
|
||||
{
|
||||
// TODO to be changed. left it here to understand how to implement
|
||||
/*
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "we_simplesyslog.h"
|
||||
|
||||
#include "we_observer.h"
|
||||
//#include "we_readthread.h"
|
||||
// #include "we_readthread.h"
|
||||
|
||||
#include "we_cpifeederthread.h"
|
||||
|
||||
@ -57,8 +57,8 @@ class WEDataLoader : public Observer
|
||||
virtual bool update(Subject* pSub);
|
||||
|
||||
public:
|
||||
bool setupCpimport(); // fork the cpimport
|
||||
void teardownCpimport(bool useStoredWaitPidStatus); // @bug 4267
|
||||
bool setupCpimport(); // fork the cpimport
|
||||
void teardownCpimport(bool useStoredWaitPidStatus); // @bug 4267
|
||||
void pushData2Cpimport(messageqcpp::ByteStream& Ibs); // push data to cpimport from the queue
|
||||
void closeWritePipe();
|
||||
void str2Argv(std::string CmdLine, std::vector<char*>& V);
|
||||
@ -183,7 +183,6 @@ class WEDataLoader : public Observer
|
||||
pid_t fCh_pid;
|
||||
pid_t fThis_pid;
|
||||
pid_t fP_pid;
|
||||
bool fCpIStarted;
|
||||
std::string fCmdLineStr;
|
||||
std::string fBrmRptFileName;
|
||||
|
||||
|
@ -67,9 +67,7 @@ WE_DDLCommandProc::WE_DDLCommandProc()
|
||||
if (dbct.length() != 0)
|
||||
dbrootCnt = cf->uFromText(dbct);
|
||||
}
|
||||
WE_DDLCommandProc::WE_DDLCommandProc(const WE_DDLCommandProc& rhs)
|
||||
{
|
||||
}
|
||||
|
||||
WE_DDLCommandProc::~WE_DDLCommandProc()
|
||||
{
|
||||
}
|
||||
@ -2366,9 +2364,9 @@ uint8_t WE_DDLCommandProc::updateSyscolumnNextvalCol(ByteStream& bs, std::string
|
||||
return rc;
|
||||
}
|
||||
|
||||
uint8_t WE_DDLCommandProc::updateSystableEntryForSysColumn(int32_t sessionID, uint32_t txnID,
|
||||
uint8_t WE_DDLCommandProc::updateSystableEntryForSysColumn(int32_t /*sessionID*/, uint32_t txnID,
|
||||
const DDLColumn& column, const std::string& value,
|
||||
const std::string& oldValue,
|
||||
const std::string& /*oldValue*/,
|
||||
execplan::CalpontSystemCatalog::RIDList& roList,
|
||||
std::string& err)
|
||||
{
|
||||
@ -2791,7 +2789,7 @@ uint8_t WE_DDLCommandProc::updateSystableAuto(ByteStream& bs, std::string& err)
|
||||
return rc;
|
||||
}
|
||||
|
||||
uint8_t WE_DDLCommandProc::updateSystableEntryForSysTable(int32_t sessionID, uint32_t txnID,
|
||||
uint8_t WE_DDLCommandProc::updateSystableEntryForSysTable(int32_t /*sessionID*/, uint32_t txnID,
|
||||
const DDLColumn& column, const std::string& value,
|
||||
const std::string& oldValue,
|
||||
CalpontSystemCatalog::ROPair ropair,
|
||||
|
@ -32,7 +32,6 @@
|
||||
|
||||
#define EXPORT
|
||||
|
||||
|
||||
namespace WriteEngine
|
||||
{
|
||||
struct DDLColumn;
|
||||
@ -47,7 +46,7 @@ class WE_DDLCommandProc
|
||||
TRUNCATE_LOG
|
||||
};
|
||||
WE_DDLCommandProc();
|
||||
WE_DDLCommandProc(const WE_DDLCommandProc& rhs);
|
||||
WE_DDLCommandProc(const WE_DDLCommandProc& rhs) = delete;
|
||||
~WE_DDLCommandProc();
|
||||
/** @brief Update SYSCOLUMN nextval column for the columnoid with nextVal.
|
||||
*
|
||||
@ -115,23 +114,14 @@ class WE_DDLCommandProc
|
||||
rid = relRidInThisExtent + numExtentsInThisSegPart * extentRows;
|
||||
}
|
||||
|
||||
private:
|
||||
uint8_t updateSystableEntryForSysTable(int32_t sessionID,
|
||||
uint32_t txnID,
|
||||
const DDLColumn& column,
|
||||
const std::string& value,
|
||||
const std::string& oldValue,
|
||||
execplan::CalpontSystemCatalog::ROPair ropair,
|
||||
std::string& err);
|
||||
|
||||
uint8_t updateSystableEntryForSysColumn(int32_t sessionID,
|
||||
uint32_t txnID,
|
||||
const DDLColumn& column,
|
||||
const std::string& value,
|
||||
const std::string& oldValue,
|
||||
execplan::CalpontSystemCatalog::RIDList& roList,
|
||||
std::string& err);
|
||||
private:
|
||||
uint8_t updateSystableEntryForSysTable(int32_t sessionID, uint32_t txnID, const DDLColumn& column,
|
||||
const std::string& value, const std::string& oldValue,
|
||||
execplan::CalpontSystemCatalog::ROPair ropair, std::string& err);
|
||||
|
||||
uint8_t updateSystableEntryForSysColumn(int32_t sessionID, uint32_t txnID, const DDLColumn& column,
|
||||
const std::string& value, const std::string& oldValue,
|
||||
execplan::CalpontSystemCatalog::RIDList& roList, std::string& err);
|
||||
|
||||
private:
|
||||
WriteEngineWrapper fWEWrapper;
|
||||
|
@ -415,8 +415,8 @@ uint8_t WE_DMLCommandProc::processSingleInsert(messageqcpp::ByteStream& bs, std:
|
||||
|
||||
try
|
||||
{
|
||||
datavalue = colType.convertColumnData(indata, pushWarning, insertPkg.get_TimeZone(),
|
||||
false, false);
|
||||
datavalue =
|
||||
colType.convertColumnData(indata, pushWarning, insertPkg.get_TimeZone(), false, false);
|
||||
}
|
||||
catch (exception&)
|
||||
{
|
||||
@ -993,7 +993,7 @@ uint8_t WE_DMLCommandProc::processBatchInsert(messageqcpp::ByteStream& bs, std::
|
||||
|
||||
Column aColumn;
|
||||
|
||||
if ((i == ridList.size() - 1) && (tableAUXColOid > 3000)) // AUX column
|
||||
if ((i == ridList.size() - 1) && (tableAUXColOid > 3000)) // AUX column
|
||||
{
|
||||
aColumn.colWidth = execplan::AUX_COL_WIDTH;
|
||||
aColumn.colDataType = execplan::AUX_COL_DATATYPE;
|
||||
@ -1034,8 +1034,8 @@ uint8_t WE_DMLCommandProc::processBatchInsert(messageqcpp::ByteStream& bs, std::
|
||||
}
|
||||
|
||||
//@Bug 5996 validate hwm before starts
|
||||
rc = validateColumnHWMs(ridList, systemCatalogPtr, colDBRootExtentInfo, "Starting",
|
||||
tableAUXColOid > 3000);
|
||||
rc =
|
||||
validateColumnHWMs(ridList, systemCatalogPtr, colDBRootExtentInfo, "Starting", tableAUXColOid > 3000);
|
||||
|
||||
if (rc != 0)
|
||||
{
|
||||
@ -1346,8 +1346,8 @@ uint8_t WE_DMLCommandProc::processBatchInsert(messageqcpp::ByteStream& bs, std::
|
||||
|
||||
try
|
||||
{
|
||||
datavalue = colType.convertColumnData(indata, pushWarning, insertPkg.get_TimeZone(),
|
||||
false, false);
|
||||
datavalue =
|
||||
colType.convertColumnData(indata, pushWarning, insertPkg.get_TimeZone(), false, false);
|
||||
}
|
||||
catch (exception&)
|
||||
{
|
||||
@ -2046,7 +2046,7 @@ uint8_t WE_DMLCommandProc::processBatchInsertBinary(messageqcpp::ByteStream& bs,
|
||||
case execplan::CalpontSystemCatalog::BLOB:
|
||||
bs >> valStr;
|
||||
|
||||
if (!valStr.isNull()) // null values do not require any padding or truncation.
|
||||
if (!valStr.isNull()) // null values do not require any padding or truncation.
|
||||
{
|
||||
if (valStr.length() > (unsigned int)colType.colWidth)
|
||||
{
|
||||
@ -2215,7 +2215,7 @@ uint8_t WE_DMLCommandProc::processBatchInsertBinary(messageqcpp::ByteStream& bs,
|
||||
return rc;
|
||||
}
|
||||
|
||||
uint8_t WE_DMLCommandProc::commitBatchAutoOn(messageqcpp::ByteStream& bs, std::string& err)
|
||||
uint8_t WE_DMLCommandProc::commitBatchAutoOn(messageqcpp::ByteStream& bs, std::string& /*err*/)
|
||||
{
|
||||
uint8_t rc = 0;
|
||||
// need to commit the versioned blocks, set hwm, update casual partition, send back to DMLProc to set them
|
||||
@ -2452,8 +2452,7 @@ uint8_t WE_DMLCommandProc::processBatchInsertHwm(messageqcpp::ByteStream& bs, st
|
||||
auxColDBRootExtentInfo.end());
|
||||
}
|
||||
|
||||
rc = validateColumnHWMs(ridList, systemCatalogPtr, colDBRootExtentInfo, "Ending",
|
||||
hasAUXCol);
|
||||
rc = validateColumnHWMs(ridList, systemCatalogPtr, colDBRootExtentInfo, "Ending", hasAUXCol);
|
||||
|
||||
if (rc != 0)
|
||||
{
|
||||
@ -2675,7 +2674,7 @@ uint8_t WE_DMLCommandProc::processBatchInsertHwmFlushChunks(uint32_t tblOid, int
|
||||
return rc;
|
||||
}
|
||||
|
||||
uint8_t WE_DMLCommandProc::commitBatchAutoOff(messageqcpp::ByteStream& bs, std::string& err)
|
||||
uint8_t WE_DMLCommandProc::commitBatchAutoOff(messageqcpp::ByteStream& /*bs*/, std::string& /*err*/)
|
||||
{
|
||||
uint8_t rc = 0;
|
||||
// commit all versioned blocks, set hwm, update casual partition
|
||||
@ -2715,7 +2714,7 @@ uint8_t WE_DMLCommandProc::rollbackBatchAutoOn(messageqcpp::ByteStream& bs, std:
|
||||
return rc;
|
||||
}
|
||||
|
||||
uint8_t WE_DMLCommandProc::rollbackBatchAutoOff(messageqcpp::ByteStream& bs, std::string& err)
|
||||
uint8_t WE_DMLCommandProc::rollbackBatchAutoOff(messageqcpp::ByteStream& /*bs*/, std::string& /*err*/)
|
||||
{
|
||||
uint8_t rc = 0;
|
||||
// Rollbacked all versioned blocks
|
||||
@ -3447,7 +3446,7 @@ uint8_t WE_DMLCommandProc::processUpdate(messageqcpp::ByteStream& bs, std::strin
|
||||
if (!value.isNull())
|
||||
{
|
||||
unsigned i = strlen(value.str());
|
||||
value.assign(value.safeString().substr(0, i)); // XXX: why???
|
||||
value.assign(value.safeString().substr(0, i)); // XXX: why???
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -3619,8 +3618,8 @@ uint8_t WE_DMLCommandProc::processUpdate(messageqcpp::ByteStream& bs, std::strin
|
||||
|
||||
try
|
||||
{
|
||||
datavalue =
|
||||
colType.convertColumnData(colType.defaultValue.safeString(""), pushWarn, timeZone, isNull, false, false);
|
||||
datavalue = colType.convertColumnData(colType.defaultValue.safeString(""), pushWarn, timeZone,
|
||||
isNull, false, false);
|
||||
}
|
||||
catch (exception&)
|
||||
{
|
||||
@ -3652,7 +3651,8 @@ uint8_t WE_DMLCommandProc::processUpdate(messageqcpp::ByteStream& bs, std::strin
|
||||
{
|
||||
try
|
||||
{
|
||||
datavalue = colType.convertColumnData(value.safeString(""), pushWarn, timeZone, isNull, false, false);
|
||||
datavalue =
|
||||
colType.convertColumnData(value.safeString(""), pushWarn, timeZone, isNull, false, false);
|
||||
}
|
||||
catch (exception&)
|
||||
{
|
||||
@ -3792,8 +3792,8 @@ uint8_t WE_DMLCommandProc::processUpdate(messageqcpp::ByteStream& bs, std::strin
|
||||
{
|
||||
try
|
||||
{
|
||||
datavalue =
|
||||
colType.convertColumnData(colType.defaultValue.safeString(), pushWarn, timeZone, isNull, false, false);
|
||||
datavalue = colType.convertColumnData(colType.defaultValue.safeString(), pushWarn, timeZone,
|
||||
isNull, false, false);
|
||||
}
|
||||
catch (exception&)
|
||||
{
|
||||
@ -3908,7 +3908,7 @@ uint8_t WE_DMLCommandProc::processUpdate(messageqcpp::ByteStream& bs, std::strin
|
||||
}
|
||||
|
||||
uint8_t WE_DMLCommandProc::getWrittenLbids(messageqcpp::ByteStream& bs, std::string& err,
|
||||
ByteStream::quadbyte& PMId)
|
||||
ByteStream::quadbyte& /*PMId*/)
|
||||
{
|
||||
uint8_t rc = 0;
|
||||
uint32_t txnId;
|
||||
@ -4459,7 +4459,7 @@ uint8_t WE_DMLCommandProc::updateSyscolumnNextval(ByteStream& bs, std::string& e
|
||||
return rc;
|
||||
}
|
||||
|
||||
uint8_t WE_DMLCommandProc::processPurgeFDCache(ByteStream& bs, std::string& err)
|
||||
uint8_t WE_DMLCommandProc::processPurgeFDCache(ByteStream& bs, std::string& /*err*/)
|
||||
{
|
||||
int rc = 0;
|
||||
uint32_t tableOid;
|
||||
|
@ -263,7 +263,7 @@ struct ColumnThread
|
||||
//------------------------------------------------------------------------------
|
||||
// Get file size from file name in bytestream object
|
||||
//------------------------------------------------------------------------------
|
||||
int WE_GetFileSizes::processFileName(messageqcpp::ByteStream& bs, std::string& errMsg, int key)
|
||||
int WE_GetFileSizes::processFileName(messageqcpp::ByteStream& bs, std::string& errMsg, int /*key*/)
|
||||
{
|
||||
uint8_t rc = 0;
|
||||
off_t fileSize = 0;
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <cerrno>
|
||||
#include <string>
|
||||
#include <map>
|
||||
//#define NDEBUG
|
||||
// #define NDEBUG
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
#include <unistd.h>
|
||||
@ -92,7 +92,7 @@ struct fileInfoCompare // lt operator
|
||||
|
||||
return false;
|
||||
} // operator
|
||||
}; // struct
|
||||
}; // struct
|
||||
|
||||
typedef std::map<File, IDBDataFile*, fileInfoCompare> FileOpenMap;
|
||||
|
||||
@ -563,7 +563,7 @@ int BRMWrapper::getBrmRc(bool reset)
|
||||
|
||||
#define MAX_VERSION_BUFFER_SIZE 1024
|
||||
|
||||
int BRMWrapper::copyVBBlock(IDBDataFile* pSourceFile, const OID sourceOid, IDBDataFile* pTargetFile,
|
||||
int BRMWrapper::copyVBBlock(IDBDataFile* pSourceFile, const OID /*sourceOid*/, IDBDataFile* pTargetFile,
|
||||
const OID targetOid, const std::vector<uint32_t>& fboList,
|
||||
const BRM::VBRange& freeList, size_t& nBlocksProcessed, DbFileOp* pFileOp,
|
||||
const size_t fboCurrentOffset)
|
||||
@ -713,7 +713,7 @@ int BRMWrapper::copyVBBlock(IDBDataFile* pSourceFile, const OID sourceOid, IDBDa
|
||||
}
|
||||
|
||||
int BRMWrapper::copyVBBlock(IDBDataFile* pSourceFile, IDBDataFile* pTargetFile, const uint64_t sourceFbo,
|
||||
const uint64_t targetFbo, DbFileOp* fileOp, const Column& column)
|
||||
const uint64_t targetFbo, DbFileOp* fileOp, const Column& /*column*/)
|
||||
{
|
||||
size_t rwSize;
|
||||
unsigned char buf[BYTE_PER_BLOCK];
|
||||
@ -731,14 +731,14 @@ int BRMWrapper::copyVBBlock(IDBDataFile* pSourceFile, IDBDataFile* pTargetFile,
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
uint8_t BRMWrapper::newCpimportJob(uint32_t &jobId)
|
||||
uint8_t BRMWrapper::newCpimportJob(uint32_t& jobId)
|
||||
{
|
||||
return blockRsltnMgrPtr->newCpimportJob(jobId);
|
||||
}
|
||||
|
||||
void BRMWrapper::finishCpimportJob(uint32_t jobId)
|
||||
{
|
||||
if (finishReported.exchange(true)) // get old and set to true; if old is true, do nothing.
|
||||
if (finishReported.exchange(true)) // get old and set to true; if old is true, do nothing.
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1423,7 +1423,7 @@ cleanup:
|
||||
return rc;
|
||||
}
|
||||
|
||||
int BRMWrapper::rollBackVersion(const VER_t transID, int sessionId)
|
||||
int BRMWrapper::rollBackVersion(const VER_t transID, int /*sessionId*/)
|
||||
{
|
||||
std::vector<LBID_t> lbidList;
|
||||
std::vector<LBIDRange> lbidRangeList;
|
||||
|
@ -169,9 +169,8 @@ void BulkRollbackFile::truncateSegmentFile(OID columnOID, uint32_t dbRoot, uint3
|
||||
{
|
||||
WErrorCodes ec;
|
||||
std::ostringstream oss;
|
||||
oss << "Error truncating column extents from DB for"
|
||||
<< ": OID-" << columnOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; " << ec.errorString(rc);
|
||||
oss << "Error truncating column extents from DB for" << ": OID-" << columnOID << "; DbRoot-" << dbRoot
|
||||
<< "; partition-" << partNum << "; segment-" << segNum << "; " << ec.errorString(rc);
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -264,9 +263,8 @@ void BulkRollbackFile::reInitTruncColumnExtent(OID columnOID, uint32_t dbRoot, u
|
||||
{
|
||||
WErrorCodes ec;
|
||||
std::ostringstream oss;
|
||||
oss << "Error rolling back HWM column extent from DB for"
|
||||
<< ": OID-" << columnOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; " << ec.errorString(rc);
|
||||
oss << "Error rolling back HWM column extent from DB for" << ": OID-" << columnOID << "; DbRoot-"
|
||||
<< dbRoot << "; partition-" << partNum << "; segment-" << segNum << "; " << ec.errorString(rc);
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -364,9 +362,9 @@ void BulkRollbackFile::reInitTruncDctnryExtent(OID dStoreOID, uint32_t dbRoot, u
|
||||
{
|
||||
WErrorCodes ec;
|
||||
std::ostringstream oss;
|
||||
oss << "Error rolling back HWM dictionary store extent from DB for"
|
||||
<< ": OID-" << dStoreOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; " << ec.errorString(rc);
|
||||
oss << "Error rolling back HWM dictionary store extent from DB for" << ": OID-" << dStoreOID
|
||||
<< "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-" << segNum << "; "
|
||||
<< ec.errorString(rc);
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -399,8 +397,8 @@ void BulkRollbackFile::reInitTruncDctnryExtent(OID dStoreOID, uint32_t dbRoot, u
|
||||
// class can override this functionality, and return true or false depending
|
||||
// on whether the HWM chunk was modified and backed up to disk.
|
||||
//------------------------------------------------------------------------------
|
||||
bool BulkRollbackFile::doWeReInitExtent(OID columnOID, uint32_t dbRoot, uint32_t partNum,
|
||||
uint32_t segNum) const
|
||||
bool BulkRollbackFile::doWeReInitExtent(OID /*columnOID*/, uint32_t /*dbRoot*/, uint32_t /*partNum*/,
|
||||
uint32_t /*segNum*/) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -103,9 +103,8 @@ void BulkRollbackFileCompressed::truncateSegmentFile(OID columnOID, uint32_t dbR
|
||||
if (rc != NO_ERROR)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Error reading compressed column ptr headers from DB for"
|
||||
<< ": OID-" << columnOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; " << errMsg;
|
||||
oss << "Error reading compressed column ptr headers from DB for" << ": OID-" << columnOID << "; DbRoot-"
|
||||
<< dbRoot << "; partition-" << partNum << "; segment-" << segNum << "; " << errMsg;
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -121,9 +120,8 @@ void BulkRollbackFileCompressed::truncateSegmentFile(OID columnOID, uint32_t dbR
|
||||
if (!fCompressor)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Error, wrong compression type for segment file"
|
||||
<< ": OID-" << columnOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << ";";
|
||||
oss << "Error, wrong compression type for segment file" << ": OID-" << columnOID << "; DbRoot-" << dbRoot
|
||||
<< "; partition-" << partNum << "; segment-" << segNum << ";";
|
||||
throw WeException(oss.str(), ERR_COMP_WRONG_COMP_TYPE);
|
||||
}
|
||||
|
||||
@ -159,9 +157,8 @@ void BulkRollbackFileCompressed::truncateSegmentFile(OID columnOID, uint32_t dbR
|
||||
{
|
||||
WErrorCodes ec;
|
||||
std::ostringstream oss;
|
||||
oss << "Error writing compressed column headers to DB for"
|
||||
<< ": OID-" << columnOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; " << ec.errorString(rc);
|
||||
oss << "Error writing compressed column headers to DB for" << ": OID-" << columnOID << "; DbRoot-"
|
||||
<< dbRoot << "; partition-" << partNum << "; segment-" << segNum << "; " << ec.errorString(rc);
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -174,9 +171,8 @@ void BulkRollbackFileCompressed::truncateSegmentFile(OID columnOID, uint32_t dbR
|
||||
{
|
||||
WErrorCodes ec;
|
||||
std::ostringstream oss;
|
||||
oss << "Error truncating compressed column extents from DB for"
|
||||
<< ": OID-" << columnOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; " << ec.errorString(rc);
|
||||
oss << "Error truncating compressed column extents from DB for" << ": OID-" << columnOID << "; DbRoot-"
|
||||
<< dbRoot << "; partition-" << partNum << "; segment-" << segNum << "; " << ec.errorString(rc);
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -211,9 +207,9 @@ void BulkRollbackFileCompressed::reInitTruncColumnExtent(OID columnOID, uint32_t
|
||||
long long startOffset = startOffsetBlk * BYTE_PER_BLOCK;
|
||||
|
||||
std::ostringstream msgText1;
|
||||
msgText1 << "Reinit HWM compressed column extent in db file"
|
||||
<< ": dbRoot-" << dbRoot << "; part#-" << partNum << "; seg#-" << segNum << "; rawOffset(bytes)-"
|
||||
<< startOffset << "; rawFreeBlks-" << nBlocks;
|
||||
msgText1 << "Reinit HWM compressed column extent in db file" << ": dbRoot-" << dbRoot << "; part#-"
|
||||
<< partNum << "; seg#-" << segNum << "; rawOffset(bytes)-" << startOffset << "; rawFreeBlks-"
|
||||
<< nBlocks;
|
||||
fMgr->logAMessage(logging::LOG_TYPE_INFO, logging::M0075, columnOID, msgText1.str());
|
||||
|
||||
std::string segFile;
|
||||
@ -239,9 +235,8 @@ void BulkRollbackFileCompressed::reInitTruncColumnExtent(OID columnOID, uint32_t
|
||||
if (rc != NO_ERROR)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Error reading compressed column ptr headers from DB for"
|
||||
<< ": OID-" << columnOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; " << errMsg;
|
||||
oss << "Error reading compressed column ptr headers from DB for" << ": OID-" << columnOID << "; DbRoot-"
|
||||
<< dbRoot << "; partition-" << partNum << "; segment-" << segNum << "; " << errMsg;
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -257,9 +252,8 @@ void BulkRollbackFileCompressed::reInitTruncColumnExtent(OID columnOID, uint32_t
|
||||
if (!fCompressor)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Error, wrong compression type for segment file"
|
||||
<< ": OID-" << columnOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << ";";
|
||||
oss << "Error, wrong compression type for segment file" << ": OID-" << columnOID << "; DbRoot-" << dbRoot
|
||||
<< "; partition-" << partNum << "; segment-" << segNum << ";";
|
||||
throw WeException(oss.str(), ERR_COMP_WRONG_COMP_TYPE);
|
||||
}
|
||||
|
||||
@ -279,9 +273,9 @@ void BulkRollbackFileCompressed::reInitTruncColumnExtent(OID columnOID, uint32_t
|
||||
if (rc != NO_ERROR)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Error restoring HWM chunk for"
|
||||
<< ": OID-" << columnOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; blkoff-" << blockOffset << "; " << errMsg;
|
||||
oss << "Error restoring HWM chunk for" << ": OID-" << columnOID << "; DbRoot-" << dbRoot
|
||||
<< "; partition-" << partNum << "; segment-" << segNum << "; blkoff-" << blockOffset << "; "
|
||||
<< errMsg;
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -392,9 +386,8 @@ void BulkRollbackFileCompressed::reInitTruncColumnExtent(OID columnOID, uint32_t
|
||||
{
|
||||
WErrorCodes ec;
|
||||
std::ostringstream oss;
|
||||
oss << "Error writing compressed column headers to DB for"
|
||||
<< ": OID-" << columnOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; " << ec.errorString(rc);
|
||||
oss << "Error writing compressed column headers to DB for" << ": OID-" << columnOID << "; DbRoot-"
|
||||
<< dbRoot << "; partition-" << partNum << "; segment-" << segNum << "; " << ec.errorString(rc);
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -407,9 +400,8 @@ void BulkRollbackFileCompressed::reInitTruncColumnExtent(OID columnOID, uint32_t
|
||||
{
|
||||
WErrorCodes ec;
|
||||
std::ostringstream oss;
|
||||
oss << "Error truncating compressed column extents from DB for"
|
||||
<< ": OID-" << columnOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; " << ec.errorString(rc);
|
||||
oss << "Error truncating compressed column extents from DB for" << ": OID-" << columnOID << "; DbRoot-"
|
||||
<< dbRoot << "; partition-" << partNum << "; segment-" << segNum << "; " << ec.errorString(rc);
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -510,9 +502,8 @@ void BulkRollbackFileCompressed::reInitTruncDctnryExtent(OID dStoreOID, uint32_t
|
||||
if (rc != NO_ERROR)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Error reading compressed dctnry ptr headers from DB for"
|
||||
<< ": OID-" << dStoreOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; " << errMsg;
|
||||
oss << "Error reading compressed dctnry ptr headers from DB for" << ": OID-" << dStoreOID << "; DbRoot-"
|
||||
<< dbRoot << "; partition-" << partNum << "; segment-" << segNum << "; " << errMsg;
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -528,9 +519,8 @@ void BulkRollbackFileCompressed::reInitTruncDctnryExtent(OID dStoreOID, uint32_t
|
||||
if (!fCompressor)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Error, wrong compression type for segment file"
|
||||
<< ": OID-" << dStoreOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << ";";
|
||||
oss << "Error, wrong compression type for segment file" << ": OID-" << dStoreOID << "; DbRoot-" << dbRoot
|
||||
<< "; partition-" << partNum << "; segment-" << segNum << ";";
|
||||
throw WeException(oss.str(), ERR_COMP_WRONG_COMP_TYPE);
|
||||
}
|
||||
|
||||
@ -547,8 +537,8 @@ void BulkRollbackFileCompressed::reInitTruncDctnryExtent(OID dStoreOID, uint32_t
|
||||
if (rc == ERR_FILE_NOT_EXIST)
|
||||
{
|
||||
std::ostringstream msgText3;
|
||||
msgText3 << "No restore needed to Compressed dictionary file"
|
||||
<< ": dbRoot-" << dbRoot << "; part#-" << partNum << "; seg#-" << segNum;
|
||||
msgText3 << "No restore needed to Compressed dictionary file" << ": dbRoot-" << dbRoot << "; part#-"
|
||||
<< partNum << "; seg#-" << segNum;
|
||||
fMgr->logAMessage(logging::LOG_TYPE_INFO, logging::M0075, dStoreOID, msgText3.str());
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
@ -558,9 +548,9 @@ void BulkRollbackFileCompressed::reInitTruncDctnryExtent(OID dStoreOID, uint32_t
|
||||
if (rc != NO_ERROR)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Error restoring HWM chunk for"
|
||||
<< ": OID-" << dStoreOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; blkoff-" << blockOffset << "; " << errMsg;
|
||||
oss << "Error restoring HWM chunk for" << ": OID-" << dStoreOID << "; DbRoot-" << dbRoot
|
||||
<< "; partition-" << partNum << "; segment-" << segNum << "; blkoff-" << blockOffset << "; "
|
||||
<< errMsg;
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -590,8 +580,8 @@ void BulkRollbackFileCompressed::reInitTruncDctnryExtent(OID dStoreOID, uint32_t
|
||||
if (bAbbreviatedExtent) // log adjusted nBlock count for abbrev extent
|
||||
msgText2 << "; rawFreeBlks-" << nBlocks << " (abbrev)";
|
||||
|
||||
msgText2 << "; restoredChunk-" << restoredChunkLen << " bytes"
|
||||
<< "; truncated to " << fileSizeBytes << " bytes";
|
||||
msgText2 << "; restoredChunk-" << restoredChunkLen << " bytes" << "; truncated to " << fileSizeBytes
|
||||
<< " bytes";
|
||||
fMgr->logAMessage(logging::LOG_TYPE_INFO, logging::M0075, dStoreOID, msgText2.str());
|
||||
|
||||
// Initialize the remainder of the extent after the HWM chunk
|
||||
@ -653,9 +643,8 @@ void BulkRollbackFileCompressed::reInitTruncDctnryExtent(OID dStoreOID, uint32_t
|
||||
{
|
||||
WErrorCodes ec;
|
||||
std::ostringstream oss;
|
||||
oss << "Error writing compressed dictionary headers to DB for"
|
||||
<< ": OID-" << dStoreOID << "; DbRoot-" << dbRoot << "; partition-" << partNum << "; segment-"
|
||||
<< segNum << "; " << ec.errorString(rc);
|
||||
oss << "Error writing compressed dictionary headers to DB for" << ": OID-" << dStoreOID << "; DbRoot-"
|
||||
<< dbRoot << "; partition-" << partNum << "; segment-" << segNum << "; " << ec.errorString(rc);
|
||||
|
||||
fDbFile.closeFile(pFile);
|
||||
throw WeException(oss.str(), rc);
|
||||
@ -838,8 +827,8 @@ int BulkRollbackFileCompressed::restoreHWMChunk(IDBDataFile* pFile, OID columnOI
|
||||
{
|
||||
WErrorCodes ec;
|
||||
std::ostringstream oss;
|
||||
oss << "Error setting column file offset"
|
||||
<< "; offset-" << fileOffsetByteForRestoredChunk << "; " << ec.errorString(rc);
|
||||
oss << "Error setting column file offset" << "; offset-" << fileOffsetByteForRestoredChunk << "; "
|
||||
<< ec.errorString(rc);
|
||||
errMsg = oss.str();
|
||||
|
||||
delete backupFile;
|
||||
@ -877,9 +866,8 @@ int BulkRollbackFileCompressed::restoreHWMChunk(IDBDataFile* pFile, OID columnOI
|
||||
{
|
||||
WErrorCodes ec;
|
||||
std::ostringstream oss;
|
||||
oss << "Error writing to column file"
|
||||
<< "; offset-" << fileOffsetByteForRestoredChunk << "; bytes-" << restoredChunkLen << "; "
|
||||
<< ec.errorString(rc);
|
||||
oss << "Error writing to column file" << "; offset-" << fileOffsetByteForRestoredChunk << "; bytes-"
|
||||
<< restoredChunkLen << "; " << ec.errorString(rc);
|
||||
errMsg = oss.str();
|
||||
|
||||
delete backupFile;
|
||||
@ -898,7 +886,7 @@ int BulkRollbackFileCompressed::restoreHWMChunk(IDBDataFile* pFile, OID columnOI
|
||||
// the backup file is not found, we assume that it's because one was not created
|
||||
// and thus not needed.
|
||||
//------------------------------------------------------------------------------
|
||||
bool BulkRollbackFileCompressed::doWeReInitExtent(OID columnOID, uint32_t dbRoot, uint32_t partNum,
|
||||
bool BulkRollbackFileCompressed::doWeReInitExtent(OID columnOID, uint32_t /*dbRoot*/, uint32_t partNum,
|
||||
uint32_t segNum) const
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
@ -98,15 +98,15 @@ void BulkRollbackFileCompressedHdfs::truncateSegmentFile(OID columnOID, uint32_t
|
||||
void BulkRollbackFileCompressedHdfs::reInitTruncColumnExtent(OID columnOID, uint32_t dbRoot, uint32_t partNum,
|
||||
uint32_t segNum, long long startOffsetBlk,
|
||||
int nBlocks,
|
||||
CalpontSystemCatalog::ColDataType colType,
|
||||
uint32_t colWidth, bool restoreHwmChk)
|
||||
CalpontSystemCatalog::ColDataType /*colType*/,
|
||||
uint32_t /*colWidth*/, bool /*restoreHwmChk*/)
|
||||
{
|
||||
long long startOffset = startOffsetBlk * BYTE_PER_BLOCK;
|
||||
|
||||
std::ostringstream msgText;
|
||||
msgText << "Reinit HWM compressed column extent in HDFS db file"
|
||||
<< ": dbRoot-" << dbRoot << "; part#-" << partNum << "; seg#-" << segNum << "; rawOffset(bytes)-"
|
||||
<< startOffset << "; rawFreeBlks-" << nBlocks;
|
||||
msgText << "Reinit HWM compressed column extent in HDFS db file" << ": dbRoot-" << dbRoot << "; part#-"
|
||||
<< partNum << "; seg#-" << segNum << "; rawOffset(bytes)-" << startOffset << "; rawFreeBlks-"
|
||||
<< nBlocks;
|
||||
fMgr->logAMessage(logging::LOG_TYPE_INFO, logging::M0075, columnOID, msgText.str());
|
||||
|
||||
restoreFromBackup("column", columnOID, dbRoot, partNum, segNum);
|
||||
@ -146,8 +146,8 @@ void BulkRollbackFileCompressedHdfs::reInitTruncDctnryExtent(OID dStoreOID, uint
|
||||
// Let ConfirmHdfsDbFile later determine when/if/how to restore from any
|
||||
// existing backup file.
|
||||
//------------------------------------------------------------------------------
|
||||
bool BulkRollbackFileCompressedHdfs::doWeReInitExtent(OID columnOID, uint32_t dbRoot, uint32_t partNum,
|
||||
uint32_t segNum) const
|
||||
bool BulkRollbackFileCompressedHdfs::doWeReInitExtent(OID /*columnOID*/, uint32_t /*dbRoot*/,
|
||||
uint32_t /*partNum*/, uint32_t /*segNum*/) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ class Cache
|
||||
/**
|
||||
* @brief Get the cache key
|
||||
*/
|
||||
static CacheKey getCacheKey(const OID oid, const uint64_t lbid)
|
||||
static CacheKey getCacheKey(const OID /*oid*/, const uint64_t lbid)
|
||||
{
|
||||
CacheKey key = lbid; /*Convertor::int2Str( oid ) + "|" + Convertor::int2Str(lbid)*/
|
||||
;
|
||||
|
@ -360,7 +360,7 @@ CompFileData* ChunkManager::getFileDataByName(const std::string& filename, const
|
||||
|
||||
|
||||
CompFileData* ChunkManager::getFileData_(const FileID& fileID, const string& filename, const char* mode,
|
||||
int size, const CalpontSystemCatalog::ColDataType colDataType,
|
||||
const int /*size*/, const CalpontSystemCatalog::ColDataType colDataType,
|
||||
int colWidth, bool useTmpSuffix, bool dctnry, bool isReadOnly) const
|
||||
{
|
||||
CompFileData* fileData = new CompFileData(fileID, fileID.fFid, colDataType, colWidth, isReadOnly);
|
||||
@ -433,7 +433,7 @@ CompFileData* ChunkManager::getFileData_(const FileID& fileID, const string& fil
|
||||
//------------------------------------------------------------------------------
|
||||
IDBDataFile* ChunkManager::createDctnryFile(const FID& fid, int64_t width, uint16_t root, uint32_t partition,
|
||||
uint16_t segment, const char* filename, const char* mode,
|
||||
int size, BRM::LBID_t lbid)
|
||||
const int /*size*/, BRM::LBID_t lbid)
|
||||
{
|
||||
FileID fileID(fid, root, partition, segment);
|
||||
CompFileData* fileData = new CompFileData(fileID, fid, CalpontSystemCatalog::VARCHAR, width);
|
||||
|
@ -248,7 +248,7 @@ const std::string Convertor::int2Str(int val)
|
||||
******************************************************************************/
|
||||
/* static */
|
||||
|
||||
long long Convertor::convertDecimalString(const char* field, int fieldLength, int scale)
|
||||
long long Convertor::convertDecimalString(const char* field, int /*fieldLength*/, int scale)
|
||||
{
|
||||
long double dval = strtold(field, nullptr);
|
||||
long long ret = 0;
|
||||
|
@ -304,7 +304,7 @@ int DbFileOp::writeDBFileNoVBCache(CommBlock& cb, const unsigned char* writeBuf,
|
||||
* Core function for writing data w/o using VB cache
|
||||
* (bulk load dictionary store inserts)
|
||||
***********************************************************/
|
||||
int DbFileOp::writeDBFileNoVBCache(IDBDataFile* pFile, const unsigned char* writeBuf, const int fbo,
|
||||
int DbFileOp::writeDBFileNoVBCache(IDBDataFile* pFile, const unsigned char* writeBuf, const int /*fbo*/,
|
||||
const int numOfBlock)
|
||||
{
|
||||
#ifdef PROFILE
|
||||
|
@ -321,7 +321,7 @@ int DBRootExtentTracker::selectFirstSegFile(DBRootExtentInfo& dbRootExtent, bool
|
||||
// Mutex lock not needed in this function as it is only called from main thread
|
||||
// before processing threads are spawned.
|
||||
//------------------------------------------------------------------------------
|
||||
int DBRootExtentTracker::selectFirstSegFileForEmptyPM(std::string& errMsg)
|
||||
int DBRootExtentTracker::selectFirstSegFileForEmptyPM(std::string& /*errMsg*/)
|
||||
{
|
||||
fEmptyOrDisabledPM = true;
|
||||
|
||||
|
@ -114,7 +114,7 @@ void FileOp::closeFile(IDBDataFile* pFile) const
|
||||
* RETURN:
|
||||
* NO_ERROR if success, otherwise if fail
|
||||
***********************************************************/
|
||||
int FileOp::createDir(const char* dirName, mode_t mode) const
|
||||
int FileOp::createDir(const char* dirName, mode_t /*mode*/) const
|
||||
{
|
||||
boost::mutex::scoped_lock lk(m_mkdirMutex);
|
||||
int rc = IDBPolicy::mkdir(dirName);
|
||||
@ -378,7 +378,7 @@ int FileOp::deleteFiles(const std::vector<int32_t>& fids) const
|
||||
* NO_ERROR if success
|
||||
* ERR_DM_CONVERT_OID if error occurs converting OID to file name
|
||||
***********************************************************/
|
||||
int FileOp::deletePartitions(const std::vector<OID>& fids,
|
||||
int FileOp::deletePartitions(const std::vector<OID>& /*fids*/,
|
||||
const std::vector<BRM::PartitionInfo>& partitions) const
|
||||
{
|
||||
char tempFileName[FILE_NAME_SIZE];
|
||||
@ -578,9 +578,9 @@ int FileOp::extendFile(OID oid, const uint8_t* emptyVal, int width,
|
||||
if (isDebug(DEBUG_1) && getLogger())
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Opening existing column file (extendFile)"
|
||||
<< ": OID-" << oid << "; DBRoot-" << dbRoot << "; part-" << partition << "; seg-" << segment
|
||||
<< "; LBID-" << startLbid << "; hwm-" << hwm << "; file-" << segFile;
|
||||
oss << "Opening existing column file (extendFile)" << ": OID-" << oid << "; DBRoot-" << dbRoot
|
||||
<< "; part-" << partition << "; seg-" << segment << "; LBID-" << startLbid << "; hwm-" << hwm
|
||||
<< "; file-" << segFile;
|
||||
getLogger()->logMsg(oss.str(), MSGLVL_INFO2);
|
||||
}
|
||||
|
||||
@ -637,9 +637,9 @@ int FileOp::extendFile(OID oid, const uint8_t* emptyVal, int width,
|
||||
if (getLogger())
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "FileOp::extendFile: error padding partial compressed extent for "
|
||||
<< "column OID-" << oid << "; DBRoot-" << dbRoot << "; part-" << partition << "; seg-"
|
||||
<< segment << "; hwm-" << hwm << " " << failedTask.c_str();
|
||||
oss << "FileOp::extendFile: error padding partial compressed extent for " << "column OID-" << oid
|
||||
<< "; DBRoot-" << dbRoot << "; part-" << partition << "; seg-" << segment << "; hwm-" << hwm
|
||||
<< " " << failedTask.c_str();
|
||||
getLogger()->logMsg(oss.str(), rc, MSGLVL_CRITICAL);
|
||||
}
|
||||
|
||||
@ -690,9 +690,9 @@ int FileOp::extendFile(OID oid, const uint8_t* emptyVal, int width,
|
||||
if (getLogger())
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "FileOp::extendFile: error padding partial uncompressed extent for "
|
||||
<< "column OID-" << oid << "; DBRoot-" << dbRoot << "; part-" << partition << "; seg-"
|
||||
<< segment << "; hwm-" << hwm;
|
||||
oss << "FileOp::extendFile: error padding partial uncompressed extent for " << "column OID-"
|
||||
<< oid << "; DBRoot-" << dbRoot << "; part-" << partition << "; seg-" << segment << "; hwm-"
|
||||
<< hwm;
|
||||
getLogger()->logMsg(oss.str(), rc, MSGLVL_CRITICAL);
|
||||
}
|
||||
|
||||
@ -723,9 +723,8 @@ int FileOp::extendFile(OID oid, const uint8_t* emptyVal, int width,
|
||||
if (isDebug(DEBUG_1) && getLogger())
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Opening new column file"
|
||||
<< ": OID-" << oid << "; DBRoot-" << dbRoot << "; part-" << partition << "; seg-" << segment
|
||||
<< "; LBID-" << startLbid << "; hwm-" << hwm << "; file-" << segFile;
|
||||
oss << "Opening new column file" << ": OID-" << oid << "; DBRoot-" << dbRoot << "; part-" << partition
|
||||
<< "; seg-" << segment << "; LBID-" << startLbid << "; hwm-" << hwm << "; file-" << segFile;
|
||||
getLogger()->logMsg(oss.str(), MSGLVL_INFO2);
|
||||
}
|
||||
|
||||
@ -818,9 +817,9 @@ int FileOp::addExtentExactFile(OID oid, const uint8_t* emptyVal, int width, int&
|
||||
if (isDebug(DEBUG_1) && getLogger())
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Opening existing column file"
|
||||
<< ": OID-" << oid << "; DBRoot-" << dbRoot << "; part-" << partition << "; seg-" << segment
|
||||
<< "; LBID-" << startLbid << "; hwm-" << hwm << "; file-" << segFile;
|
||||
oss << "Opening existing column file" << ": OID-" << oid << "; DBRoot-" << dbRoot << "; part-"
|
||||
<< partition << "; seg-" << segment << "; LBID-" << startLbid << "; hwm-" << hwm << "; file-"
|
||||
<< segFile;
|
||||
getLogger()->logMsg(oss.str(), MSGLVL_INFO2);
|
||||
}
|
||||
|
||||
@ -848,9 +847,8 @@ int FileOp::addExtentExactFile(OID oid, const uint8_t* emptyVal, int width, int&
|
||||
if (isDebug(DEBUG_1) && getLogger())
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Opening new column file"
|
||||
<< ": OID-" << oid << "; DBRoot-" << dbRoot << "; part-" << partition << "; seg-" << segment
|
||||
<< "; LBID-" << startLbid << "; hwm-" << hwm << "; file-" << segFile;
|
||||
oss << "Opening new column file" << ": OID-" << oid << "; DBRoot-" << dbRoot << "; part-" << partition
|
||||
<< "; seg-" << segment << "; LBID-" << startLbid << "; hwm-" << hwm << "; file-" << segFile;
|
||||
getLogger()->logMsg(oss.str(), MSGLVL_INFO2);
|
||||
}
|
||||
|
||||
@ -1290,9 +1288,9 @@ int FileOp::fillCompColumnExtentEmptyChunks(OID oid, int colWidth, const uint8_t
|
||||
if (getLogger())
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "Converting abbreviated partial extent to full extent for"
|
||||
<< ": OID-" << oid << "; DBRoot-" << dbRoot << "; part-" << partition << "; seg-" << segment
|
||||
<< "; file-" << segFile << "; wid-" << colWidth << "; oldBlkCnt-" << blkCount << "; newBlkCnt-"
|
||||
oss << "Converting abbreviated partial extent to full extent for" << ": OID-" << oid << "; DBRoot-"
|
||||
<< dbRoot << "; part-" << partition << "; seg-" << segment << "; file-" << segFile << "; wid-"
|
||||
<< colWidth << "; oldBlkCnt-" << blkCount << "; newBlkCnt-"
|
||||
<< ((ROWS_PER_EXTENT * colWidth) / BYTE_PER_BLOCK);
|
||||
getLogger()->logMsg(oss.str(), MSGLVL_INFO2);
|
||||
}
|
||||
@ -1652,7 +1650,7 @@ int FileOp::writeHeaders(IDBDataFile* pFile, const char* controlHdr, const char*
|
||||
* else returns NO_ERROR.
|
||||
***********************************************************/
|
||||
int FileOp::initDctnryExtent(IDBDataFile* pFile, uint16_t dbRoot, int nBlocks, unsigned char* blockHdrInit,
|
||||
int blockHdrInitSize, bool bExpandExtent, bool bOptExtension, int64_t lbid)
|
||||
int blockHdrInitSize, bool /*bExpandExtent*/, bool bOptExtension, int64_t lbid)
|
||||
{
|
||||
// @bug5769 Don't initialize extents or truncate db files on HDFS
|
||||
if (idbdatafile::IDBPolicy::useHdfs())
|
||||
@ -2628,17 +2626,17 @@ void FileOp::setBulkFlag(bool isBulkLoad)
|
||||
m_isBulk = isBulkLoad;
|
||||
}
|
||||
|
||||
int FileOp::flushFile(int rc, std::map<FID, FID>& oids)
|
||||
int FileOp::flushFile(int /*rc*/, std::map<FID, FID>& /*oids*/)
|
||||
{
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
int FileOp::updateColumnExtent(IDBDataFile* pFile, int nBlocks, int64_t lbid)
|
||||
int FileOp::updateColumnExtent(IDBDataFile* /*pFile*/, int /*nBlocks*/, int64_t /*lbid*/)
|
||||
{
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
int FileOp::updateDctnryExtent(IDBDataFile* pFile, int nBlocks, int64_t lbid)
|
||||
int FileOp::updateDctnryExtent(IDBDataFile* /*pFile*/, int /*nBlocks*/, int64_t /*lbid*/)
|
||||
{
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
@ -129,10 +129,6 @@ class WECmdArgs
|
||||
{
|
||||
this->fJobId = fJobId;
|
||||
}
|
||||
void setOrigJobId(std::string fOrigJobId)
|
||||
{
|
||||
this->fOrigJobId = fJobId;
|
||||
}
|
||||
void setLocFile(std::string fLocFile)
|
||||
{
|
||||
this->fLocFile = fLocFile;
|
||||
|
@ -295,7 +295,7 @@ void WESplClient::write(const messageqcpp::ByteStream& Msg)
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
void WESplClient::read(messageqcpp::SBS& Sbs)
|
||||
void WESplClient::read(messageqcpp::SBS& /*Sbs*/)
|
||||
{
|
||||
// read from the WEServerMsgQueue
|
||||
// if Key is needed give that constant here
|
||||
|
@ -675,7 +675,7 @@ int ColumnOp::createColumn(Column& column, int colNo, int colWidth,
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int ColumnOp::fillColumn(const TxnID& txnid, Column& column, Column& refCol, void* defaultVal, Dctnry* dctnry,
|
||||
int ColumnOp::fillColumn(const TxnID& /*txnid*/, Column& column, Column& refCol, void* defaultVal, Dctnry* dctnry,
|
||||
ColumnOp* refColOp, const OID dictOid, const int dictColWidth,
|
||||
const string defaultValStr, bool autoincrement)
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ ColumnOpCompress0::~ColumnOpCompress0()
|
||||
IDBDataFile* ColumnOpCompress0::openFile(const Column& column, const uint16_t dbRoot,
|
||||
const uint32_t partition, const uint16_t segment,
|
||||
std::string& segFile, bool useTmpSuffix, const char* mode,
|
||||
const int ioBuffSize, bool isReadOnly) const
|
||||
const int /*ioBuffSize*/, bool /*isReadOnly*/) const
|
||||
{
|
||||
return FileOp::openFile(column.dataFile.fid, dbRoot, partition, segment, segFile, mode, column.colWidth,
|
||||
useTmpSuffix);
|
||||
|
@ -181,7 +181,7 @@ WriteEngineWrapper::~WriteEngineWrapper()
|
||||
* NO_ERROR if success
|
||||
* others if something wrong in the checking process
|
||||
***********************************************************/
|
||||
int WriteEngineWrapper::checkValid(const TxnID& txnid, const ColStructList& colStructList,
|
||||
int WriteEngineWrapper::checkValid(const TxnID& /*txnid*/, const ColStructList& colStructList,
|
||||
const ColValueList& colValueList, const RIDList& ridList) const
|
||||
{
|
||||
ColTupleList curTupleList;
|
||||
@ -343,7 +343,7 @@ bool updateRangeCheckForInvalidity(ExtCPInfo* maxMin, InternalType value, Intern
|
||||
* both arrays are present (update).
|
||||
*/
|
||||
void WriteEngineWrapper::updateMaxMinRange(const size_t totalNewRow, const size_t totalOldRow,
|
||||
const execplan::CalpontSystemCatalog::ColType& cscColType,
|
||||
const execplan::CalpontSystemCatalog::ColType& /*cscColType*/,
|
||||
const ColType colType, const void* valArrayVoid,
|
||||
const void* oldValArrayVoid, ExtCPInfo* maxMin,
|
||||
bool canStartWithInvalidRange)
|
||||
@ -1105,7 +1105,7 @@ inline void allocateValArray(void*& valArray, ColTupleList::size_type totalRow,
|
||||
}
|
||||
}
|
||||
|
||||
int WriteEngineWrapper::deleteBadRows(const TxnID& txnid, ColStructList& colStructs, RIDList& ridList,
|
||||
int WriteEngineWrapper::deleteBadRows(const TxnID& /*txnid*/, ColStructList& colStructs, RIDList& ridList,
|
||||
DctnryStructList& dctnryStructList)
|
||||
{
|
||||
/* Need to scan all files including dictionary store files to check whether there is any bad chunks
|
||||
@ -1218,7 +1218,7 @@ static void log_this(const char *message,
|
||||
|
||||
/** @brief Determine whether we may update a column's ranges (by type) and return nullptr if we can't */
|
||||
static ExtCPInfo* getCPInfoToUpdateForUpdatableType(const ColStruct& colStruct, ExtCPInfo* currentCPInfo,
|
||||
OpType optype)
|
||||
OpType /*optype*/)
|
||||
{
|
||||
if (colStruct.tokenFlag)
|
||||
{
|
||||
@ -6108,7 +6108,7 @@ int WriteEngineWrapper::tokenize(const TxnID& txnid, DctnryStruct& dctnryStruct,
|
||||
* ERR_FILE_EXIST if file exists
|
||||
* ERR_FILE_CREATE if something wrong in creating the file
|
||||
***********************************************************/
|
||||
int WriteEngineWrapper::createDctnry(const TxnID& txnid, const OID& dctnryOid, int colWidth, uint16_t dbRoot,
|
||||
int WriteEngineWrapper::createDctnry(const TxnID& /*txnid*/, const OID& dctnryOid, int colWidth, uint16_t dbRoot,
|
||||
uint32_t partiotion, uint16_t segment, int compressionType)
|
||||
{
|
||||
BRM::LBID_t startLbid;
|
||||
@ -6198,7 +6198,7 @@ int WriteEngineWrapper::bulkRollback(OID tableOid, uint64_t lockID, const std::s
|
||||
return rc;
|
||||
}
|
||||
|
||||
int WriteEngineWrapper::rollbackCommon(const TxnID& txnid, int sessionId)
|
||||
int WriteEngineWrapper::rollbackCommon(const TxnID& txnid, int /*sessionId*/)
|
||||
{
|
||||
// Remove the unwanted tmp files and recover compressed chunks.
|
||||
string prefix;
|
||||
@ -6588,7 +6588,7 @@ void WriteEngineWrapper::AddDictToList(const TxnID txnid, std::vector<BRM::LBID_
|
||||
}
|
||||
|
||||
// Get CPInfo for given starting LBID and column description structure.
|
||||
int WriteEngineWrapper::GetLBIDRange(const BRM::LBID_t startingLBID, const ColStruct& colStruct,
|
||||
int WriteEngineWrapper::GetLBIDRange(const BRM::LBID_t startingLBID, const ColStruct& /*colStruct*/,
|
||||
ExtCPInfo& cpInfo)
|
||||
{
|
||||
int rtn;
|
||||
|
@ -124,9 +124,9 @@ class WriteEngineWrapper : public WEObj
|
||||
* @brief Build a index from an oid file (NOTE: this is write engine internal used function, just for test
|
||||
* purpose and not for generic use
|
||||
*/
|
||||
int buildIndex(const OID& colOid, const OID& treeOid, const OID& listOid,
|
||||
execplan::CalpontSystemCatalog::ColDataType colDataType, int width, int hwm, bool resetFile,
|
||||
uint64_t& totalRows, int maxRow = IDX_DEFAULT_READ_ROW)
|
||||
int buildIndex(const OID& /*colOid*/, const OID& /*treeOid*/, const OID& /*listOid*/,
|
||||
execplan::CalpontSystemCatalog::ColDataType /*colDataType*/, int /*width*/, int /*hwm*/, bool /*resetFile*/,
|
||||
uint64_t& /*totalRows*/, int /*maxRow*/ = IDX_DEFAULT_READ_ROW)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@ -134,10 +134,10 @@ class WriteEngineWrapper : public WEObj
|
||||
/**
|
||||
* @brief Build a index from a file
|
||||
*/
|
||||
int buildIndex(const std::string& sourceFileName, const OID& treeOid, const OID& listOid,
|
||||
execplan::CalpontSystemCatalog::ColDataType colDataType, int width, int hwm, bool resetFile,
|
||||
uint64_t& totalRows, const std::string& indexName, Log* pLogger,
|
||||
int maxRow = IDX_DEFAULT_READ_ROW)
|
||||
int buildIndex(const std::string& /*sourceFileName*/, const OID& /*treeOid*/, const OID& /*listOid*/,
|
||||
execplan::CalpontSystemCatalog::ColDataType /*colDataType*/, int /*width*/, int /*hwm*/, bool /*resetFile*/,
|
||||
uint64_t& /*totalRows*/, const std::string& /*indexName*/, Log* /*pLogger*/,
|
||||
int /*maxRow*/ = IDX_DEFAULT_READ_ROW)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@ -152,7 +152,7 @@ class WriteEngineWrapper : public WEObj
|
||||
/**
|
||||
* @brief Close a dictionary
|
||||
*/
|
||||
int closeDctnry(const TxnID& txnid, int i, bool realClose = true)
|
||||
int closeDctnry(const TxnID& /*txnid*/, int i, bool realClose = true)
|
||||
{
|
||||
return m_dctnry[op(i)]->closeDctnry(realClose);
|
||||
}
|
||||
@ -220,7 +220,7 @@ class WriteEngineWrapper : public WEObj
|
||||
* @param treeOid index tree file object id
|
||||
* @param listOid index list file object id
|
||||
*/
|
||||
int createIndex(const TxnID& txnid, const OID& treeOid, const OID& listOid)
|
||||
int createIndex(const TxnID& /*txnid*/, const OID& /*treeOid*/, const OID& /*listOid*/)
|
||||
{
|
||||
int rc = -1;
|
||||
return rc;
|
||||
@ -268,7 +268,7 @@ class WriteEngineWrapper : public WEObj
|
||||
* @brief Drop a column, include object ids for column data file
|
||||
* @param dataOid column datafile object id
|
||||
*/
|
||||
int dropColumn(const TxnID& txnid, const OID dataOid)
|
||||
int dropColumn(const TxnID& /*txnid*/, const OID dataOid)
|
||||
{
|
||||
return m_colOp[0]->dropColumn((FID)dataOid);
|
||||
}
|
||||
@ -277,7 +277,7 @@ class WriteEngineWrapper : public WEObj
|
||||
* @brief Drop files
|
||||
* @param dataOids column and dictionary datafile object id
|
||||
*/
|
||||
int dropFiles(const TxnID& txnid, const std::vector<int32_t>& dataOids)
|
||||
int dropFiles(const TxnID& /*txnid*/, const std::vector<int32_t>& dataOids)
|
||||
{
|
||||
return m_colOp[0]->dropFiles(dataOids);
|
||||
}
|
||||
@ -291,7 +291,7 @@ class WriteEngineWrapper : public WEObj
|
||||
return m_colOp[0]->dropPartitions(dataOids, partitions);
|
||||
}
|
||||
|
||||
int deleteOIDsFromExtentMap(const TxnID& txnid, const std::vector<int32_t>& dataOids)
|
||||
int deleteOIDsFromExtentMap(const TxnID& /*txnid*/, const std::vector<int32_t>& dataOids)
|
||||
{
|
||||
return m_colOp[0]->deleteOIDsFromExtentMap(dataOids);
|
||||
}
|
||||
@ -301,7 +301,7 @@ class WriteEngineWrapper : public WEObj
|
||||
* @param treeOid index tree file object id
|
||||
* @param listOid index list file object id
|
||||
*/
|
||||
int dropIndex(const TxnID& txnid, const OID& treeOid, const OID& listOid)
|
||||
int dropIndex(const TxnID& /*txnid*/, const OID& /*treeOid*/, const OID& /*listOid*/)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@ -312,7 +312,7 @@ class WriteEngineWrapper : public WEObj
|
||||
* @param treeOid dictionary tree file object id
|
||||
* @param listOid index list file object id
|
||||
*/
|
||||
int dropDctnry(const TxnID& txnid, const OID& dctnryOid, const OID& treeOid, const OID& listOid)
|
||||
int dropDctnry(const TxnID& /*txnid*/, const OID& dctnryOid, const OID& /*treeOid*/, const OID& /*listOid*/)
|
||||
{
|
||||
return m_dctnry[0]->dropDctnry(dctnryOid);
|
||||
}
|
||||
|
@ -51,8 +51,7 @@ namespace WriteEngine
|
||||
// Constructor
|
||||
//------------------------------------------------------------------------------
|
||||
XMLJob::XMLJob()
|
||||
: fDebugLevel(DEBUG_0)
|
||||
, fDeleteTempFile(false)
|
||||
: fDeleteTempFile(false)
|
||||
, fValidateColList(true)
|
||||
, fTimeZone(dataconvert::systemTimeZoneOffset())
|
||||
{
|
||||
@ -1182,7 +1181,7 @@ void XMLJob::validateAllColumnsHaveTags(const execplan::CalpontSystemCatalog::RI
|
||||
//------------------------------------------------------------------------------
|
||||
/* static */
|
||||
int XMLJob::genJobXMLFileName(const string& sXMLJobDir, const string& jobDir, const string& jobId,
|
||||
bool bTempFile, const string& schemaName, const string& tableName,
|
||||
bool bTempFile, const string& /*schemaName*/, const string& /*tableName*/,
|
||||
boost::filesystem::path& xmlFilePath, string& errMsg,
|
||||
const std::string& tableOIDStr)
|
||||
{
|
||||
|
@ -142,7 +142,6 @@ class XMLJob : public XMLOp
|
||||
|
||||
Job fJob; // current job xml
|
||||
|
||||
DebugLevel fDebugLevel; // internal use debug level
|
||||
bool fDeleteTempFile; // delete tmp jobfile in destructor
|
||||
std::string fJobFileName; // job file name
|
||||
JobColList fDefaultColumns; // temporary list of default cols
|
||||
|
Reference in New Issue
Block a user