1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

compiler warning with gcc 13.0.1

utils/funcexp/func_between.cpp:246:21: error: possibly dangling reference to a temporary [-Werror=dangling-reference]

use datatypes::Charset().getCharset() like it's used everywhere else
This commit is contained in:
Sergei Golubchik
2023-06-09 18:25:56 +02:00
committed by Gagan Goel
parent e66a937c7c
commit 4b5c790b21

View File

@ -243,19 +243,19 @@ inline bool getBool(rowgroup::Row& row, funcexp::FunctionParm& pm, bool& isNull,
case execplan::CalpontSystemCatalog::TEXT:
{
const string& val = pm[0]->data()->getStrVal(row, isNull);
CHARSET_INFO& cs = datatypes::Charset(ct.charsetNumber).getCharset();
CHARSET_INFO *cs = &datatypes::Charset(ct.charsetNumber).getCharset();
if (notBetween)
{
if (!strGE(cs, val, pm[1]->data()->getStrVal(row, isNull)) && !isNull)
if (!strGE(*cs, val, pm[1]->data()->getStrVal(row, isNull)) && !isNull)
return true;
isNull = false;
return (!strLE(cs, val, pm[2]->data()->getStrVal(row, isNull)) && !isNull);
return (!strLE(*cs, val, pm[2]->data()->getStrVal(row, isNull)) && !isNull);
}
return !isNull && strGE(cs, val, pm[1]->data()->getStrVal(row, isNull)) &&
strLE(cs, val, pm[2]->data()->getStrVal(row, isNull));
return !isNull && strGE(*cs, val, pm[1]->data()->getStrVal(row, isNull)) &&
strLE(*cs, val, pm[2]->data()->getStrVal(row, isNull));
}
default: