diff --git a/utils/funcexp/func_lcase.cpp b/utils/funcexp/func_lcase.cpp index 66d96c68c..674a4b044 100644 --- a/utils/funcexp/func_lcase.cpp +++ b/utils/funcexp/func_lcase.cpp @@ -53,7 +53,11 @@ std::string Func_lcase::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is CHARSET_INFO* cs = colType.getCharset(); uint64_t inLen = tstr.length(); +#if MYSQL_VERSION_ID >= 101004 + uint64_t bufLen = inLen * cs->casedn_multiply(); +#else uint64_t bufLen = inLen * cs->casedn_multiply; +#endif char* outBuf = new char[bufLen]; uint64_t outLen = cs->casedn(tstr.str(), inLen, outBuf, bufLen); diff --git a/utils/funcexp/func_ucase.cpp b/utils/funcexp/func_ucase.cpp index 815bb2194..5e9602643 100644 --- a/utils/funcexp/func_ucase.cpp +++ b/utils/funcexp/func_ucase.cpp @@ -62,7 +62,11 @@ std::string Func_ucase::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is CHARSET_INFO* cs = colType.getCharset(); uint64_t inLen = tstr.length(); - uint64_t bufLen = inLen * cs->caseup_multiply; +#if MYSQL_VERSION_ID >= 101004 + uint64_t bufLen = inLen * cs->casedn_multiply(); +#else + uint64_t bufLen = inLen * cs->casedn_multiply; +#endif char* outBuf = new char[bufLen]; uint64_t outLen = cs->caseup(tstr.str(), inLen, outBuf, bufLen);