You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-05 16:15:50 +03:00
MCOL-641 Remove memset from group_concat.
This commit is contained in:
@@ -939,8 +939,10 @@ void GroupConcatOrderBy::getResult(uint8_t* buff, const string& sep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t resultSize = oss.str().size();
|
size_t resultSize = oss.str().size();
|
||||||
|
resultSize = (resultSize > fGroupConcatLen) ? fGroupConcatLen : resultSize;
|
||||||
fOutputString.reset(new uint8_t[resultSize + 2]);
|
fOutputString.reset(new uint8_t[resultSize + 2]);
|
||||||
memset(fOutputString.get(), 0, resultSize + 2);
|
fOutputString[resultSize] = '\0';
|
||||||
|
fOutputString[resultSize + 1] = '\0';
|
||||||
|
|
||||||
strncpy((char*)fOutputString.get(),
|
strncpy((char*)fOutputString.get(),
|
||||||
oss.str().c_str(), resultSize);
|
oss.str().c_str(), resultSize);
|
||||||
|
Reference in New Issue
Block a user