1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-05-28 13:01:26 +03:00

MCOL-963 only set isNewQuery on INFINIDB_CREATE_VTABLE

This commit is contained in:
David Hall 2017-10-30 18:07:27 -05:00
parent 97eb46213b
commit 21e031798c

View File

@ -2838,7 +2838,10 @@ int ha_calpont_impl_rnd_init(TABLE* table)
// set query state to be in_process. Sometimes mysql calls rnd_init multiple // 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 // times, this makes sure plan only being generated and sent once. It will be
// reset when query finishes in sm::end_query // reset when query finishes in sm::end_query
thd->infinidb_vtable.isNewQuery = false; if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_CREATE_VTABLE)
{
thd->infinidb_vtable.isNewQuery = false;
}
// common path for both vtable select phase and table mode -- open scan handle // common path for both vtable select phase and table mode -- open scan handle
ti = ci->tableMap[table]; ti = ci->tableMap[table];
@ -3074,7 +3077,7 @@ int ha_calpont_impl_rnd_end(TABLE* table)
thd->infinidb_vtable.vtable_state = THD::INFINIDB_SELECT_VTABLE; // flip back to normal state thd->infinidb_vtable.vtable_state = THD::INFINIDB_SELECT_VTABLE; // flip back to normal state
return rc; return rc;
} }
if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_REDO_PHASE1 && thd->infinidb_vtable.mysql_optimizer_off) if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_REDO_PHASE1)
return rc; return rc;
if ( (thd->lex)->sql_command == SQLCOM_ALTER_TABLE ) if ( (thd->lex)->sql_command == SQLCOM_ALTER_TABLE )