diff --git a/utils/funcexp/func_lcase.cpp b/utils/funcexp/func_lcase.cpp index 7de396e47..817e82ae1 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.c_str(), inLen, outBuf, bufLen); diff --git a/utils/funcexp/func_ucase.cpp b/utils/funcexp/func_ucase.cpp index 4d78fb8b2..9fa00e67d 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.c_str(), inLen, outBuf, bufLen);