Skip to content

Commit

Permalink
MCOL-5437 Fixes to follow the charset_info api change introduced by M…
Browse files Browse the repository at this point in the history
…DEV-30661
  • Loading branch information
drrtuy authored and tntnatbry committed May 1, 2023
1 parent 7cb8e33 commit 5278865
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions utils/funcexp/func_lcase.cpp
Expand Up @@ -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);
Expand Down
6 changes: 5 additions & 1 deletion utils/funcexp/func_ucase.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 5278865

Please sign in to comment.