1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-4100 Use correct collation for certain functions

LOCATE, INSTR, STRCMP and FIND_IN_SET
This commit is contained in:
David Hall
2020-06-24 15:32:22 -05:00
parent 960c07a647
commit 3f15ed1303
2 changed files with 15 additions and 2 deletions

View File

@ -74,7 +74,7 @@ int64_t Func_strcmp::getIntVal(rowgroup::Row& row,
const string& str = fp[0]->data()->getStrVal(row, isNull);
const string& str1 = fp[1]->data()->getStrVal(row, isNull);
int ret = cs->strnncoll(str.c_str(), str.length(), str1.c_str(), str1.length());
int ret = cs->strnncollsp(str.c_str(), str.length(), str1.c_str(), str1.length());
// mysql's strcmp returns only -1, 0, and 1
return (ret < 0 ? -1 : (ret > 0 ? 1 : 0));
}