1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

Part#2 MCOL-495 Make string comparison not case sensitive

Fixing field='str' for short (non-Dict) CHAR and VARCHAR data types.
This commit is contained in:
Alexander Barkov
2020-12-01 12:50:54 +04:00
parent 0ff6a6ec20
commit 52c5af054a
10 changed files with 268 additions and 88 deletions

View File

@@ -1542,8 +1542,14 @@ DataConvert::StringToString(const datatypes::SystemCatalog::TypeAttributesStd& c
//check data length
if ( data.length() > (unsigned int)colType.colWidth )
{
// TODO: charsetNumber should be moved to TypeStdAttributes ASAP
const execplan::CalpontSystemCatalog::ColType &colType2=
static_cast<const execplan::CalpontSystemCatalog::ColType &>(colType);
datatypes::Charset cs(colType2.charsetNumber);
const char *newEnd = data.data() + colType.colWidth;
const char *origEnd = data.data() + data.length();
pushWarning = cs.test_if_important_data(newEnd, origEnd);
data = data.substr(0, colType.colWidth);
pushWarning = true;
boost::any value = data;
return value;
}