1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2026-10-23 21:49:05 +03:00

MCOL-5328: use PCRE2 and JPCRE wrapper (#3137)

PCRE2 for regexp functions in columnstore
This commit is contained in:
Leonid Fedorov
2024-03-14 18:39:29 +03:00
committed by GitHub
parent c01e1f4ed8
commit 5f40fb32d0
18 changed files with 6112 additions and 66 deletions

View File

@@ -146,6 +146,23 @@ class Charset
Charset(CHARSET_INFO* cs = nullptr) : mCharset(cs ? cs : &my_charset_bin)
{
}
bool operator==(const Charset& rhs)
{
return rhs.getCharset().cs_name.str == getCharset().cs_name.str;
}
std::string convert(const std::string& from, const datatypes::Charset& fromCs) const
{
std::string result;
uint dummy_errors;
result.resize(from.size() * getCharset().mbmaxlen);
size_t resultingSize = my_convert(const_cast<char*>(result.c_str()), result.size(), &getCharset(), from.c_str(),
from.size(), &fromCs.getCharset(), &dummy_errors);
result.resize(resultingSize);
return result;
}
Charset(uint32_t charsetNumber);
void setCharset(uint32_t charsetNumber);
CHARSET_INFO& getCharset() const