Skip to content

Commit e6e74c0

Browse files
drrtuytntnatbry
authored andcommitted
MCOL-5437 Fixes to follow the charset_info api change introduced by MDEV-30661
1 parent 3364ceb commit e6e74c0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

utils/funcexp/func_lcase.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ std::string Func_lcase::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
5353

5454
CHARSET_INFO* cs = colType.getCharset();
5555
uint64_t inLen = tstr.length();
56+
#if MYSQL_VERSION_ID >= 101004
57+
uint64_t bufLen = inLen * cs->casedn_multiply();
58+
#else
5659
uint64_t bufLen = inLen * cs->casedn_multiply;
60+
#endif
5761
char* outBuf = new char[bufLen];
5862

5963
uint64_t outLen = cs->casedn(tstr.str(), inLen, outBuf, bufLen);

utils/funcexp/func_ucase.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ std::string Func_ucase::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
6262

6363
CHARSET_INFO* cs = colType.getCharset();
6464
uint64_t inLen = tstr.length();
65-
uint64_t bufLen = inLen * cs->caseup_multiply;
65+
#if MYSQL_VERSION_ID >= 101004
66+
uint64_t bufLen = inLen * cs->casedn_multiply();
67+
#else
68+
uint64_t bufLen = inLen * cs->casedn_multiply;
69+
#endif
6670
char* outBuf = new char[bufLen];
6771

6872
uint64_t outLen = cs->caseup(tstr.str(), inLen, outBuf, bufLen);

0 commit comments

Comments
 (0)