diff --git a/tools/configMgt/autoConfigure.cpp b/tools/configMgt/autoConfigure.cpp index 659192b6d..85702952a 100644 --- a/tools/configMgt/autoConfigure.cpp +++ b/tools/configMgt/autoConfigure.cpp @@ -2165,6 +2165,7 @@ int main(int argc, char* argv[]) string PmMaxMemorySmallSide; string ThreadPoolSize; + try { ColScanReadAheadBlocks = sysConfigOld->getConfig("PrimitiveServers", "ColScanReadAheadBlocks"); diff --git a/utils/funcexp/func_concat.cpp b/utils/funcexp/func_concat.cpp index 90404b232..39a72b4fa 100644 --- a/utils/funcexp/func_concat.cpp +++ b/utils/funcexp/func_concat.cpp @@ -55,11 +55,14 @@ 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; diff --git a/utils/funcexp/func_concat_ws.cpp b/utils/funcexp/func_concat_ws.cpp index 5268e17b7..767544291 100644 --- a/utils/funcexp/func_concat_ws.cpp +++ b/utils/funcexp/func_concat_ws.cpp @@ -49,8 +49,8 @@ string Func_concat_ws::getStrVal(Row& row, bool& isNull, CalpontSystemCatalog::ColType&) { - string delim = stringValue(parm[0], row, isNull); - + string delim; + stringValue(parm[0], row, isNull, delim); if (isNull) return ""; @@ -63,8 +63,8 @@ string Func_concat_ws::getStrVal(Row& row, for ( unsigned int id = 1 ; id < parm.size() ; id++) { - string tstr = stringValue(parm[id], row, isNull); - + string tstr; + stringValue(parm[id], row, isNull, tstr); if (isNull) { isNull = false; @@ -94,10 +94,11 @@ string Func_concat_ws::getStrVal(Row& row, #else string str; - + string tmp; for ( uint32_t i = 1 ; i < parm.size() ; i++) { - str += string(stringValue(parm[i], row, isNull).c_str()); + string(stringValue(parm[i], row, isNull).c_str(), tmp); + str += tmp; if (isNull) { diff --git a/utils/funcexp/func_elt.cpp b/utils/funcexp/func_elt.cpp index 1cf394444..d34dafa78 100644 --- a/utils/funcexp/func_elt.cpp +++ b/utils/funcexp/func_elt.cpp @@ -100,7 +100,9 @@ string Func_elt::getStrVal(rowgroup::Row& row, return ""; } - return stringValue(parm[number], row, isNull); + std::string ret; + stringValue(parm[number], row, isNull, ret); + return ret; } diff --git a/utils/funcexp/func_insert.cpp b/utils/funcexp/func_insert.cpp index 5782eb699..88d731eb4 100644 --- a/utils/funcexp/func_insert.cpp +++ b/utils/funcexp/func_insert.cpp @@ -88,13 +88,13 @@ std::string Func_insert::getStrVal(rowgroup::Row& row, bool& isNull, execplan::CalpontSystemCatalog::ColType&) { - const string& tstr = stringValue(fp[0], row, isNull); - + string tstr; + stringValue(fp[0], row, isNull, tstr); if (isNull) return ""; - const string& tnewstr = stringValue(fp[3], row, isNull); - + string tnewstr; + stringValue(fp[3], row, isNull, tnewstr); if (isNull) return ""; diff --git a/utils/funcexp/func_repeat.cpp b/utils/funcexp/func_repeat.cpp index 03a3bdd37..b99114c5a 100644 --- a/utils/funcexp/func_repeat.cpp +++ b/utils/funcexp/func_repeat.cpp @@ -61,7 +61,9 @@ std::string Func_repeat::getStrVal(rowgroup::Row& row, bool& isNull, execplan::CalpontSystemCatalog::ColType& op_ct) { - string str = stringValue(fp[0], row, isNull); + string str; + + stringValue(fp[0], row, isNull, str); if (str.empty() || str == "") return ""; diff --git a/utils/funcexp/func_reverse.cpp b/utils/funcexp/func_reverse.cpp index 3fdcdeb2e..6ef4fcf1f 100644 --- a/utils/funcexp/func_reverse.cpp +++ b/utils/funcexp/func_reverse.cpp @@ -65,7 +65,8 @@ std::string Func_reverse::getStrVal(rowgroup::Row& row, bool& isNull, execplan::CalpontSystemCatalog::ColType&) { - string str = stringValue(fp[0], row, isNull); + string str; + stringValue(fp[0], row, isNull, str); // We used to reverse in the string buffer, but that doesn't // work for all compilers as some re-use the buffer on simple diff --git a/utils/funcexp/functor_str.h b/utils/funcexp/functor_str.h index b7051be4e..8b6c10404 100644 --- a/utils/funcexp/functor_str.h +++ b/utils/funcexp/functor_str.h @@ -100,7 +100,7 @@ public: } protected: - const std::string& stringValue(execplan::SPTP& fp, rowgroup::Row& row, bool& isNull) + const void stringValue(execplan::SPTP& fp, rowgroup::Row& row, bool& isNull, std::string& fFloatStr) { // Bug3788, use the shorter of fixed or scientific notation for floating point values. // [ the default format in treenode.h is fixed-point notation ] @@ -120,7 +120,8 @@ protected: break; default: - return fp->data()->getStrVal(row, isNull); + fFloatStr = fp->data()->getStrVal(row, isNull); + return; break; } @@ -140,10 +141,7 @@ protected: fFloatStr += buf; } - return fFloatStr; } - - std::string fFloatStr; };