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

Fix code style

This commit is contained in:
Andrew Hutchings
2018-05-31 14:44:48 +01:00
parent 53f281933a
commit 1d8964ec0d
12 changed files with 38 additions and 28 deletions

View File

@ -9877,6 +9877,7 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
select_query += ord_cols; select_query += ord_cols;
} }
} }
// LIMIT and OFFSET are extracted from TABLE_LIST elements. // LIMIT and OFFSET are extracted from TABLE_LIST elements.
// All of JOIN-ed tables contain relevant limit and offset. // All of JOIN-ed tables contain relevant limit and offset.
if (gi.groupByTables->select_lex->select_limit) if (gi.groupByTables->select_lex->select_limit)

View File

@ -2769,6 +2769,7 @@ int64_t DataConvert::stringToTime(const string& data)
if (*end != '\0') if (*end != '\0')
return -1; return -1;
hour = day * 24; hour = day * 24;
day = -1; day = -1;
time = data.substr(pos + 1, data.length() - pos - 1); time = data.substr(pos + 1, data.length() - pos - 1);

View File

@ -86,6 +86,7 @@ int64_t addTime(DateTime& dt1, Time& dt2)
dt2.day = hour / 24; dt2.day = hour / 24;
hour = hour % 24; hour = hour % 24;
} }
if (hour < 0) if (hour < 0)
{ {
dt.hour = hour + 24; dt.hour = hour + 24;

View File

@ -77,7 +77,10 @@ public:
{ {
return fLocFile; return fLocFile;
} }
int getReadBufSize() { return fReadBufSize; } int getReadBufSize()
{
return fReadBufSize;
}
{ {
return fMode; return fMode;
} }

View File

@ -87,6 +87,7 @@ WEFileReadThread::WEFileReadThread(WESDHandler& aSdh): fSdh(aSdh),
{ {
//TODO batch qty to get from config //TODO batch qty to get from config
fBatchQty = 10000; fBatchQty = 10000;
if (fSdh.getReadBufSize() < DEFAULTBUFFSIZE) if (fSdh.getReadBufSize() < DEFAULTBUFFSIZE)
{ {
fBuffSize = DEFAULTBUFFSIZE; fBuffSize = DEFAULTBUFFSIZE;
@ -95,6 +96,7 @@ WEFileReadThread::WEFileReadThread(WESDHandler& aSdh): fSdh(aSdh),
{ {
fBuffSize = fSdh.getReadBufSize(); fBuffSize = fSdh.getReadBufSize();
} }
fBuff = new char [fBuffSize]; fBuff = new char [fBuffSize];
} }
@ -362,17 +364,17 @@ unsigned int WEFileReadThread::readDataFile(messageqcpp::SBS& Sbs)
if (fEnclEsc) if (fEnclEsc)
{ {
//pStart = aBuff; //pStart = aBuff;
aLen = getNextRow(fInFile, fBuff, fBuffSize-1); aLen = getNextRow(fInFile, fBuff, fBuffSize - 1);
} }
else else
{ {
fInFile.getline(fBuff, fBuffSize-1); fInFile.getline(fBuff, fBuffSize - 1);
aLen = fInFile.gcount(); aLen = fInFile.gcount();
} }
////aLen chars incl \n, Therefore aLen-1; '<<' oper won't go past it ////aLen chars incl \n, Therefore aLen-1; '<<' oper won't go past it
//cout << "Data Length " << aLen <<endl; //cout << "Data Length " << aLen <<endl;
if((aLen < (fBuffSize-2)) && (aLen>0)) if ((aLen < (fBuffSize - 2)) && (aLen > 0))
{ {
fBuff[aLen - 1] = '\n'; fBuff[aLen - 1] = '\n';
fBuff[aLen] = 0; fBuff[aLen] = 0;
@ -384,7 +386,7 @@ unsigned int WEFileReadThread::readDataFile(messageqcpp::SBS& Sbs)
if (fSdh.getDebugLvl() > 2) cout << "File data line = " << aIdx << endl; if (fSdh.getDebugLvl() > 2) cout << "File data line = " << aIdx << endl;
} }
else if(aLen>=fBuffSize-2) //Didn't hit delim; BIG ROW else if (aLen >= fBuffSize - 2) //Didn't hit delim; BIG ROW
{ {
cout << "Bad Row data " << endl; cout << "Bad Row data " << endl;
cout << fBuff << endl; cout << fBuff << endl;

View File

@ -126,7 +126,7 @@ public:
void add2InputDataFileList(std::string& FileName); void add2InputDataFileList(std::string& FileName);
private: private:
enum { DEFAULTBUFFSIZE=1024*1024 }; enum { DEFAULTBUFFSIZE = 1024 * 1024 };
// don't allow anyone else to set // don't allow anyone else to set
void setTgtPmId(unsigned int fTgtPmId) void setTgtPmId(unsigned int fTgtPmId)

View File

@ -302,6 +302,7 @@ int ColumnOp::allocRowId(const TxnID& txnid, bool useStartingExtent,
tableMetaData->setColExtsInfo(newColStructList[i].dataOid, aColExtsInfo); tableMetaData->setColExtsInfo(newColStructList[i].dataOid, aColExtsInfo);
} }
newExtent = dbRootExtentTrackers[column.colNo]->nextSegFile(dbRoot, partition, segment, newHwm, startLbid); newExtent = dbRootExtentTrackers[column.colNo]->nextSegFile(dbRoot, partition, segment, newHwm, startLbid);
} }
} }

View File

@ -1687,6 +1687,7 @@ int WriteEngineWrapper::insertColumnRecsBinary(const TxnID& txnid,
// that all HWMs will be incremented by this operation // that all HWMs will be incremented by this operation
int32_t lowColLen = 8192; int32_t lowColLen = 8192;
int32_t colId = 0; int32_t colId = 0;
for (uint32_t colIt = 0; colIt < colStructList.size(); colIt++) for (uint32_t colIt = 0; colIt < colStructList.size(); colIt++)
{ {
if (colStructList[colIt].colWidth < lowColLen) if (colStructList[colIt].colWidth < lowColLen)