From 9a012444ec46cdbebc35b92b01dc27f0c15030b0 Mon Sep 17 00:00:00 2001 From: David Hall Date: Tue, 14 Nov 2017 15:25:38 -0600 Subject: [PATCH] MCOL-963 fix for regressions introduced --- dbcon/mysql/ha_calpont_execplan.cpp | 1 - dbcon/mysql/ha_calpont_impl.cpp | 11 ++++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dbcon/mysql/ha_calpont_execplan.cpp b/dbcon/mysql/ha_calpont_execplan.cpp index a0d8ed8b1..4eaa8aab5 100755 --- a/dbcon/mysql/ha_calpont_execplan.cpp +++ b/dbcon/mysql/ha_calpont_execplan.cpp @@ -6488,7 +6488,6 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i // re-construct the select query and redo phase 1 if (redo) { - ++gwi.thd->infinidb_vtable.redo_count; // select now() from region case. returnedCols should have minSc. if (sel_cols_in_create.length() == 0) { diff --git a/dbcon/mysql/ha_calpont_impl.cpp b/dbcon/mysql/ha_calpont_impl.cpp index 5ff9002ad..781047106 100755 --- a/dbcon/mysql/ha_calpont_impl.cpp +++ b/dbcon/mysql/ha_calpont_impl.cpp @@ -2838,10 +2838,7 @@ int ha_calpont_impl_rnd_init(TABLE* table) // set query state to be in_process. Sometimes mysql calls rnd_init multiple // times, this makes sure plan only being generated and sent once. It will be // reset when query finishes in sm::end_query - if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_CREATE_VTABLE) - { - thd->infinidb_vtable.isNewQuery = false; - } + thd->infinidb_vtable.isNewQuery = false; // common path for both vtable select phase and table mode -- open scan handle ti = ci->tableMap[table]; @@ -3077,8 +3074,8 @@ int ha_calpont_impl_rnd_end(TABLE* table) thd->infinidb_vtable.vtable_state = THD::INFINIDB_SELECT_VTABLE; // flip back to normal state return rc; } - if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_REDO_PHASE1) - return rc; +// if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_REDO_PHASE1) +// return rc; if ( (thd->lex)->sql_command == SQLCOM_ALTER_TABLE ) return rc; @@ -3095,7 +3092,7 @@ int ha_calpont_impl_rnd_end(TABLE* table) // @bug 4022. error handling for select part of dml if (ci->cal_conn_hndl && ci->rc) { - // send ExeMgr a signal before cloing the connection + // send ExeMgr a signal before closing the connection ByteStream msg; ByteStream::quadbyte qb = 0; msg << qb;