1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Merge pull request #1309 from dhall-MariaDB/MCOL-4100

MCOL-4100 Use correct collation for certain functions
This commit is contained in:
Patrick LeBlanc
2020-06-29 10:32:01 -05:00
committed by GitHub
2 changed files with 15 additions and 2 deletions

View File

@ -4088,7 +4088,20 @@ ReturnedColumn* buildFunctionColumn(
fc->operationType(functor->operationType(funcParms, fc->resultType()));
fc->expressionId(ci->expressionId++);
fc->charsetNumber(ifp->collation.collation->number);
// A few functions use a different collation than that found in
// the base ifp class
if (funcName == "locate" ||
funcName == "find_in_set" ||
funcName == "strcmp")
{
DTCollation dt;
ifp->Type_std_attributes::agg_arg_charsets_for_comparison(dt, ifp->func_name(), ifp->arguments(), 1, 1);
fc->charsetNumber(dt.collation->number);
}
else
{
fc->charsetNumber(ifp->collation.collation->number);
}
}
else if (ifp->type() == Item::COND_ITEM ||
ifp->functype() == Item_func::EQ_FUNC ||