You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOl-3536 Collation phase 2
This commit is contained in:
@ -75,6 +75,8 @@ std::string Func_trim::getStrVal(rowgroup::Row& row,
|
||||
if (strTLen == 0 || strTLen > strLen)
|
||||
return src;
|
||||
|
||||
bool binaryCmp = (cs->state & MY_CS_BINSORT) || !cs->use_mb();
|
||||
|
||||
if (binTLen == 1)
|
||||
{
|
||||
// If the trim string is 1 byte, don't waste cpu for memcmp
|
||||
@ -86,7 +88,7 @@ std::string Func_trim::getStrVal(rowgroup::Row& row,
|
||||
}
|
||||
// Trim trailing
|
||||
const char* ptr = pos;
|
||||
if (cs->use_mb()) // This is a multi-byte charset
|
||||
if (!binaryCmp) // This is a multi-byte charset
|
||||
{
|
||||
const char* p = pos;
|
||||
uint32 l;
|
||||
@ -124,7 +126,7 @@ std::string Func_trim::getStrVal(rowgroup::Row& row,
|
||||
}
|
||||
|
||||
// Trim trailing
|
||||
if (cs->use_mb()) // This is a multi-byte charset
|
||||
if (!binaryCmp) // This is a multi-byte charset
|
||||
{
|
||||
// The problem is that the byte pattern at the end could
|
||||
// match memcmp, but not be correct since the first byte compared
|
||||
|
Reference in New Issue
Block a user