From 5719c835b47be95d674219ec27407d7c8444686b Mon Sep 17 00:00:00 2001 From: Roman Nozdrin Date: Fri, 23 Dec 2022 10:57:10 +0000 Subject: [PATCH] MCOL-3561 This patch updates Connector code after MDEV-29988 --- dbcon/mysql/ha_mcs_execplan.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dbcon/mysql/ha_mcs_execplan.cpp b/dbcon/mysql/ha_mcs_execplan.cpp index 2b9549374..344cb4566 100644 --- a/dbcon/mysql/ha_mcs_execplan.cpp +++ b/dbcon/mysql/ha_mcs_execplan.cpp @@ -3463,6 +3463,10 @@ ReturnedColumn* buildReturnedColumn(Item* item, gp_walk_info& gwi, bool& nonSupp break; default: + if (ref->ref_type() == Item_ref::DIRECT_REF) + { + return buildReturnedColumn(ref->real_item(), gwi, nonSupport); + } gwi.fatalParseError = true; gwi.parseErrorText = "Unknown REF item"; break; @@ -6249,9 +6253,15 @@ void parse_item(Item* item, vector& field_vec, bool& hasNonSupportI case Item::REF_ITEM: { + Item_ref* ref = (Item_ref*)item; + if (ref->ref_type() == Item_ref::DIRECT_REF) + { + parse_item(ref->real_item(), field_vec, hasNonSupportItem, parseInfo, gwi); + break; + } while (true) { - Item_ref* ref = (Item_ref*)item; + ref = (Item_ref*)item; if ((*(ref->ref))->type() == Item::SUM_FUNC_ITEM) { @@ -7665,7 +7675,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i break; } - default: + default: { break; }