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-4726 Wrong result of WHERE char1_col='A'
This commit is contained in:
@ -604,8 +604,8 @@ inline bool colCompare(int64_t val1, int64_t val2, uint8_t COP, uint8_t rf,
|
||||
if ((typeHolder.getCharset().state & (MY_CS_BINSORT|MY_CS_NOPAD)) ==
|
||||
(MY_CS_BINSORT|MY_CS_NOPAD))
|
||||
return colCompare_(order_swap(val1), order_swap(val2), COP);
|
||||
utils::ConstString s1 = {reinterpret_cast<const char*>(&val1), 8};
|
||||
utils::ConstString s2 = {reinterpret_cast<const char*>(&val2), 8};
|
||||
utils::ConstString s1 = {reinterpret_cast<const char*>(&val1), width};
|
||||
utils::ConstString s2 = {reinterpret_cast<const char*>(&val2), width};
|
||||
return colCompareStr(typeHolder, COP, s1.rtrimZero(), s2.rtrimZero());
|
||||
}
|
||||
else
|
||||
@ -1303,10 +1303,10 @@ inline void p_Col_ridArray(NewColRequestHeader* in,
|
||||
if (out->ValidMinMax && !isNull && !isEmpty)
|
||||
{
|
||||
|
||||
if ((in->colType.DataType == CalpontSystemCatalog::CHAR ||
|
||||
in->colType.DataType == CalpontSystemCatalog::VARCHAR ||
|
||||
in->colType.DataType == CalpontSystemCatalog::BLOB ||
|
||||
in->colType.DataType == CalpontSystemCatalog::TEXT ) && 1 < W)
|
||||
if (in->colType.DataType == CalpontSystemCatalog::CHAR ||
|
||||
in->colType.DataType == CalpontSystemCatalog::VARCHAR ||
|
||||
in->colType.DataType == CalpontSystemCatalog::BLOB ||
|
||||
in->colType.DataType == CalpontSystemCatalog::TEXT )
|
||||
{
|
||||
if (colCompare(out->Min, val, COMPARE_GT, false, in->colType, W))
|
||||
out->Min = val;
|
||||
|
@ -620,8 +620,8 @@ bool StrFilterCmd::compare_cc(uint64_t i, uint64_t j)
|
||||
datatypes::Charset cs(leftColType.getCharset());
|
||||
datatypes::TCharShort s0(bpp->fFiltCmdValues[0][i]);
|
||||
datatypes::TCharShort s1(bpp->fFiltCmdValues[1][j]);
|
||||
return compareString(cs, static_cast<utils::ConstString>(s0),
|
||||
static_cast<utils::ConstString>(s1), fBOP);
|
||||
return compareString(cs, s0.toConstString(leftColType.colWidth),
|
||||
s1.toConstString(rightColType.colWidth), fBOP);
|
||||
}
|
||||
|
||||
|
||||
@ -647,7 +647,7 @@ bool StrFilterCmd::compare_cs(uint64_t i, uint64_t j)
|
||||
datatypes::Charset cs(leftColType.getCharset());
|
||||
datatypes::TCharShort s0(bpp->fFiltCmdValues[0][i]);
|
||||
utils::ConstString s1(bpp->fFiltStrValues[1][j]);
|
||||
return compareString(cs, static_cast<utils::ConstString>(s0), s1, fBOP);
|
||||
return compareString(cs, s0.toConstString(leftColType.colWidth), s1, fBOP);
|
||||
}
|
||||
|
||||
|
||||
@ -660,7 +660,7 @@ bool StrFilterCmd::compare_sc(uint64_t i, uint64_t j)
|
||||
datatypes::Charset cs(leftColType.getCharset());
|
||||
utils::ConstString s0(bpp->fFiltStrValues[0][i]);
|
||||
datatypes::TCharShort s1(bpp->fFiltCmdValues[1][j]);
|
||||
return compareString(cs, s0, static_cast<utils::ConstString>(s1), fBOP);
|
||||
return compareString(cs, s0, s1.toConstString(rightColType.colWidth), fBOP);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user