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

MCOL-963 reset infinidb_vtable.isNewQuery upon error. Add redo (REDO_PHASE1) counter.

This commit is contained in:
David Hall
2017-10-30 18:05:19 -05:00
parent ed018e8418
commit 97eb46213b

View File

@@ -2032,7 +2032,7 @@ void setError(THD* thd, uint32_t errcode, string errmsg)
errcode = ER_UNKNOWN_ERROR; errcode = ER_UNKNOWN_ERROR;
} }
thd->raise_error_printf(errcode, errmsg.c_str()); thd->raise_error_printf(errcode, errmsg.c_str());
thd->infinidb_vtable.mysql_optimizer_off = false; thd->infinidb_vtable.isNewQuery = true;
thd->infinidb_vtable.override_largeside_estimate = false; thd->infinidb_vtable.override_largeside_estimate = false;
// reset expressionID // reset expressionID
if (!(thd->infinidb_vtable.cal_conn_info)) if (!(thd->infinidb_vtable.cal_conn_info))
@@ -6369,8 +6369,8 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
} }
} }
// populate string to be added to the select list for order by
redo = (redo || fieldVec.size() != 0); redo = (redo || fieldVec.size() != 0);
// populate string to be added to the select list for order by
for (uint32_t i = 0; i < fieldVec.size(); i++) for (uint32_t i = 0; i < fieldVec.size(); i++)
{ {
SimpleColumn* sc = buildSimpleColumn(fieldVec[i], gwi); SimpleColumn* sc = buildSimpleColumn(fieldVec[i], gwi);
@@ -6488,6 +6488,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
// re-construct the select query and redo phase 1 // re-construct the select query and redo phase 1
if (redo) if (redo)
{ {
++gwi.thd->infinidb_vtable.redo_count;
// select now() from region case. returnedCols should have minSc. // select now() from region case. returnedCols should have minSc.
if (sel_cols_in_create.length() == 0) if (sel_cols_in_create.length() == 0)
{ {