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
@ -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;
|
||||
|
Reference in New Issue
Block a user