1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2026-10-23 21:49:05 +03:00

Fix Infer reports #1363, #1384-#1390: Initialize structs and variables

#1363 wf_stats.cpp:185 Uninitialized Value - cdt used without init
#1384 slavecomm.cpp:417 Uninitialized Value - segmentNum output param
#1385-#1387 slavecomm.cpp/slavedbrmnode.cpp - CPMaxMin.max/min uninitialized
#1388 slavecomm.cpp:1319 - CPMaxMinMerge.colWidth uninitialized
#1389-#1390 slavedbrmnode.cpp - CPMaxMin/CPMaxMinMerge uninitialized

Added default constructors to CPMaxMin and CPMaxMinMerge in brmtypes.h.
This commit is contained in:
Leonid Fedorov
2026-04-07 01:40:32 +00:00
committed by Vasily Kozhukhovskiy
parent 3ca07c2940
commit a5abb82f7a
3 changed files with 4 additions and 2 deletions

View File

@@ -150,7 +150,7 @@ void WF_stats<T>::resetData()
template <typename T>
void WF_stats<T>::operator()(int64_t b, int64_t e, int64_t c)
{
CDT cdt;
CDT cdt = CalpontSystemCatalog::UNDEFINED;
if ((fFrameUnit == WF__FRAME_ROWS) || (fPrev == -1) ||
(!fPeer->operator()(getPointer(fRowData->at(c)), getPointer(fRowData->at(fPrev)))))
{

View File

@@ -153,6 +153,7 @@ struct CPMaxMin
int64_t min_;
};
bool isBinaryColumn; // XXX: these two fields should be replaced with type handler pointer.
CPMaxMin() : max(0), min(0), seqNum(0), max_(0), min_(0), isBinaryColumn(false) {}
};
typedef std::tr1::unordered_map<LBID_t, CPMaxMin> CPMaxMinMap_t;
@@ -200,6 +201,7 @@ struct CPMaxMinMerge
int128_t bigMin;
int64_t min_;
};
CPMaxMinMerge() : max(0), min(0), seqNum(0), type(execplan::CalpontSystemCatalog::UNDEFINED), colWidth(0), newExtent(false), max_(0), min_(0) {}
};
typedef std::tr1::unordered_map<LBID_t, CPMaxMinMerge> CPMaxMinMergeMap_t;

View File

@@ -384,7 +384,7 @@ void SlaveComm::do_createStripeColumnExtents(ByteStream& msg)
uint16_t tmp32;
uint16_t dbRoot;
uint32_t partitionNum;
uint16_t segmentNum;
uint16_t segmentNum = 0;
std::vector<CreateStripeColumnExtentsArgIn> cols;
std::vector<CreateStripeColumnExtentsArgOut> extents;
ByteStream reply;