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

Merge branch 'develop-1.1' into 1.1-merge-up-20180531

This commit is contained in:
Andrew Hutchings
2018-05-31 14:43:52 +01:00
14 changed files with 80 additions and 140 deletions

View File

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