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

Merge branch 'develop-1.1' into 1.1-merge-up-2018-10-05

This commit is contained in:
Andrew Hutchings
2018-10-05 18:40:07 +01:00
22 changed files with 625 additions and 246 deletions

View File

@@ -4853,7 +4853,6 @@ void gp_walk(const Item* item, void* arg)
{
gp_walk_info* gwip = reinterpret_cast<gp_walk_info*>(arg);
idbassert(gwip);
bool isCached = false;
//Bailout...
if (gwip->fatalParseError) return;
@@ -4866,15 +4865,17 @@ void gp_walk(const Item* item, void* arg)
if (itype == Item::FUNC_ITEM && ((Item_func*)item)->functype() == Item_func::XOR_FUNC )
itype = Item::COND_ITEM;
if (item->type() == Item::CACHE_ITEM)
{
item = ((Item_cache*)item)->get_example();
itype = item->type();
isCached = true;
}
switch (itype)
{
case Item::CACHE_ITEM:
{
// The item or condition is cached as per MariaDB server view but
// for InfiniDB it need to be parsed and executed.
// MCOL-1188 and MCOL-1029
Item* orig_item = ((Item_cache*)item)->get_example();
orig_item->traverse_cond(gp_walk, gwip, Item::POSTFIX);
break;
}
case Item::FIELD_ITEM:
{
Item_field* ifp = (Item_field*)item;
@@ -5086,14 +5087,10 @@ void gp_walk(const Item* item, void* arg)
cc->resultType(colType_MysqlToIDB(item));
}
// cached item comes in one piece
if (!isCached)
{
for (uint32_t i = 0; i < ifp->argument_count() && !gwip->rcWorkStack.empty(); i++)
{
gwip->rcWorkStack.pop();
}
}
for (uint32_t i = 0; i < ifp->argument_count() && !gwip->rcWorkStack.empty(); i++)
{
gwip->rcWorkStack.pop();
}
// bug 3137. If filter constant like 1=0, put it to ptWorkStack
// MariaDB bug 750. Breaks if compare is an argument to a function.
@@ -5170,14 +5167,6 @@ void gp_walk(const Item* item, void* arg)
bool isOr = (ftype == Item_func::COND_OR_FUNC);
bool isXor = (ftype == Item_func::XOR_FUNC);
// MCOL-1029 A cached COND_ITEM is something like:
// AND (TRUE OR FALSE)
// We can skip it
if (isCached)
{
break;
}
List<Item>* argumentList;
List<Item> xorArgumentList;