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
MCOL-1826 Fix race in FLOAT/DOUBLE to string
In the FLOAT/DOUBLE to string conversions a class global string was used to store the result. Unfortunately it is possible for an instance of this class to be used by multiple threads of PrimProc simultaneously. This would cause a race and data corruption or more likely a crash. This fix passes a string object from the caller to use instead.
This commit is contained in:
@ -55,10 +55,13 @@ string Func_concat::getStrVal(Row& row,
|
||||
bool& isNull,
|
||||
CalpontSystemCatalog::ColType&)
|
||||
{
|
||||
string ret = stringValue(parm[0], row, isNull);
|
||||
string ret;
|
||||
string tmp;
|
||||
stringValue(parm[0], row, isNull, ret);
|
||||
|
||||
for ( unsigned int id = 1 ; id < parm.size() ; id++) {
|
||||
ret.append( stringValue(parm[id], row, isNull) );
|
||||
stringValue(parm[id], row, isNull, tmp);
|
||||
ret.append(tmp);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user