From 26e0b22738cccad29af32a5fe419855ad1c65d66 Mon Sep 17 00:00:00 2001 From: Roman Nozdrin Date: Fri, 24 Feb 2023 14:29:26 +0000 Subject: [PATCH] MCOL-5437 Fixes to follow the charset_info api change introduced by MDEV-30661 --- utils/funcexp/func_lcase.cpp | 4 ++++ utils/funcexp/func_ucase.cpp | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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);