1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

fix: MCOL-4696: get rid of boost::iequals to avoid using system collation (#3281)

Co-authored-by: Leonid Fedorov <leonid.fedorov@mariadb.com>
This commit is contained in:
drrtuy
2024-08-17 23:10:43 +03:00
committed by GitHub
parent a1b4a49d5c
commit 66b450026e
9 changed files with 62 additions and 43 deletions

View File

@ -249,4 +249,12 @@ class CollationAwareComparator : public Charset
}
};
inline bool ASCIIStringCaseInsensetiveEquals(const std::string& left, const std::string& right)
{
auto asciiHigher = [](char c) { return (c >= 'a' && c <= 'z') ? c - 'a' + 'A' : c; };
return left.size() == right.size() &&
std::equal(left.begin(), left.end(), right.begin(),
[&asciiHigher](char l, char r) { return asciiHigher(l) == asciiHigher(r); });
}
} // end of namespace datatypes