From 5247dfa0825186047c1650f0e626e145615a584e Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Tue, 4 Sep 2018 12:20:40 -0700 Subject: [PATCH] MCOL-1188 assertion 'fColumn.get() && fSub && fFunc' failed,... Some cleanup for the previous check-in. --- dbcon/mysql/ha_calpont_execplan.cpp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/dbcon/mysql/ha_calpont_execplan.cpp b/dbcon/mysql/ha_calpont_execplan.cpp index 47f07c67b..2de5dfa56 100755 --- a/dbcon/mysql/ha_calpont_execplan.cpp +++ b/dbcon/mysql/ha_calpont_execplan.cpp @@ -4084,7 +4084,6 @@ void gp_walk(const Item *item, void *arg) { gp_walk_info* gwip = reinterpret_cast(arg); idbassert(gwip); - bool isCached = false; //Bailout... if (gwip->fatalParseError) return; @@ -4101,8 +4100,8 @@ void gp_walk(const Item *item, void *arg) case Item::CACHE_ITEM: { // The item or condition is cached as per MariaDB server view but - // for InfiniDB it need to be executed. - // MCOL-1188 and + // 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; @@ -4286,13 +4285,9 @@ 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++) { - for (uint32_t i = 0; i < ifp->argument_count() && !gwip->rcWorkStack.empty(); i++) - { - gwip->rcWorkStack.pop(); - } + 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. @@ -4360,14 +4355,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 *argumentList; List xorArgumentList; if (isXor)