This commit is contained in:
VilhoRaatikka
2014-09-01 13:57:31 +03:00
parent 20abbbdf57
commit 3c1abf4b64

View File

@ -918,16 +918,12 @@ char* skygw_get_canonical(
{
Item::Type itype;
if (item->name == NULL)
{
continue;
}
itype = item->type();
if (item->name != NULL &&
(itype == Item::STRING_ITEM ||
itype == Item::INT_ITEM ||
itype == Item::DECIMAL_ITEM ||
itype == Item::REAL_ITEM ||
itype == Item::VARBIN_ITEM ||
itype == Item::NULL_ITEM))
{
if (itype == Item::STRING_ITEM)
{
String tokenstr;
@ -942,11 +938,14 @@ char* skygw_get_canonical(
querystr = replace_literal(querystr, res->ptr(), "?");
}
}
else
else if (itype == Item::INT_ITEM ||
itype == Item::DECIMAL_ITEM ||
itype == Item::REAL_ITEM ||
itype == Item::VARBIN_ITEM ||
itype == Item::NULL_ITEM)
{
querystr = replace_literal(querystr, item->name, "?");
}
}
} /*< for */
retblock:
return querystr;