You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Remove a curly brace and add a check in a for loop in create_columnstore_select_handler()
This commit is contained in:
@ -5319,54 +5319,53 @@ int ha_cs_impl_select_next(uchar* buf, TABLE* table)
|
|||||||
sm::tableid_t tableid= execplan::IDB_VTABLE_ID;
|
sm::tableid_t tableid= execplan::IDB_VTABLE_ID;
|
||||||
sm::cpsm_conhdl_t* hndl= ci->cal_conn_hndl;
|
sm::cpsm_conhdl_t* hndl= ci->cal_conn_hndl;
|
||||||
|
|
||||||
if (ti.tpl_ctx == 0)
|
if (ti.tpl_ctx == 0)
|
||||||
{
|
{
|
||||||
ti.tpl_ctx = new sm::cpsm_tplh_t();
|
ti.tpl_ctx = new sm::cpsm_tplh_t();
|
||||||
ti.tpl_scan_ctx = sm::sp_cpsm_tplsch_t(new sm::cpsm_tplsch_t());
|
ti.tpl_scan_ctx = sm::sp_cpsm_tplsch_t(new sm::cpsm_tplsch_t());
|
||||||
}
|
|
||||||
|
|
||||||
// make sure rowgroup is null so the new meta data can be taken. This is for some case mysql
|
|
||||||
// call rnd_init for a table more than once.
|
|
||||||
ti.tpl_scan_ctx->rowGroup = NULL;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
sm::tpl_open(tableid, ti.tpl_ctx, hndl);
|
|
||||||
sm::tpl_scan_open(tableid, ti.tpl_scan_ctx, hndl);
|
|
||||||
}
|
|
||||||
catch (std::exception& e)
|
|
||||||
{
|
|
||||||
uint32_t sessionID = tid2sid(thd->thread_id);
|
|
||||||
string emsg = "table can not be opened: " + string(e.what());
|
|
||||||
setError(thd, ER_INTERNAL_ERROR, emsg);
|
|
||||||
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
|
|
||||||
goto internal_error;
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
uint32_t sessionID = tid2sid(thd->thread_id);
|
|
||||||
string emsg = "table can not be opened";
|
|
||||||
setError(thd, ER_INTERNAL_ERROR, emsg);
|
|
||||||
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
|
|
||||||
goto internal_error;
|
|
||||||
}
|
|
||||||
|
|
||||||
ti.tpl_scan_ctx->traceFlags = ci->traceFlags;
|
|
||||||
|
|
||||||
if ((ti.tpl_scan_ctx->ctp).size() == 0)
|
|
||||||
{
|
|
||||||
uint32_t num_attr = table->s->fields;
|
|
||||||
|
|
||||||
for (uint32_t i = 0; i < num_attr; i++)
|
|
||||||
{
|
|
||||||
CalpontSystemCatalog::ColType ctype;
|
|
||||||
ti.tpl_scan_ctx->ctp.push_back(ctype);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ci->tableMap[table] = ti;
|
|
||||||
hndl->queryState= sm::QUERY_IN_PROCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make sure rowgroup is null so the new meta data can be taken. This is for some case mysql
|
||||||
|
// call rnd_init for a table more than once.
|
||||||
|
ti.tpl_scan_ctx->rowGroup = NULL;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
sm::tpl_open(tableid, ti.tpl_ctx, hndl);
|
||||||
|
sm::tpl_scan_open(tableid, ti.tpl_scan_ctx, hndl);
|
||||||
|
}
|
||||||
|
catch (std::exception& e)
|
||||||
|
{
|
||||||
|
uint32_t sessionID = tid2sid(thd->thread_id);
|
||||||
|
string emsg = "table can not be opened: " + string(e.what());
|
||||||
|
setError(thd, ER_INTERNAL_ERROR, emsg);
|
||||||
|
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
|
||||||
|
goto internal_error;
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
uint32_t sessionID = tid2sid(thd->thread_id);
|
||||||
|
string emsg = "table can not be opened";
|
||||||
|
setError(thd, ER_INTERNAL_ERROR, emsg);
|
||||||
|
CalpontSystemCatalog::removeCalpontSystemCatalog(sessionID);
|
||||||
|
goto internal_error;
|
||||||
|
}
|
||||||
|
|
||||||
|
ti.tpl_scan_ctx->traceFlags = ci->traceFlags;
|
||||||
|
|
||||||
|
if ((ti.tpl_scan_ctx->ctp).size() == 0)
|
||||||
|
{
|
||||||
|
uint32_t num_attr = table->s->fields;
|
||||||
|
|
||||||
|
for (uint32_t i = 0; i < num_attr; i++)
|
||||||
|
{
|
||||||
|
CalpontSystemCatalog::ColType ctype;
|
||||||
|
ti.tpl_scan_ctx->ctp.push_back(ctype);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ci->tableMap[table] = ti;
|
||||||
|
hndl->queryState= sm::QUERY_IN_PROCESS;
|
||||||
|
|
||||||
if (!ti.tpl_ctx || !ti.tpl_scan_ctx)
|
if (!ti.tpl_ctx || !ti.tpl_scan_ctx)
|
||||||
{
|
{
|
||||||
uint32_t sessionID = tid2sid(thd->thread_id);
|
uint32_t sessionID = tid2sid(thd->thread_id);
|
||||||
|
@ -415,7 +415,7 @@ create_columnstore_derived_handler(THD* thd, TABLE_LIST *derived)
|
|||||||
//G(V,E) where [V] = [E]+1
|
//G(V,E) where [V] = [E]+1
|
||||||
List<Item> join_preds_list;
|
List<Item> join_preds_list;
|
||||||
TABLE_LIST *tl;
|
TABLE_LIST *tl;
|
||||||
for (tl= sl->get_table_list(); tl; tl= tl->next_local)
|
for (tl = sl->get_table_list(); !unsupported_feature && tl; tl = tl->next_local)
|
||||||
{
|
{
|
||||||
Item_cond* where_icp= 0;
|
Item_cond* where_icp= 0;
|
||||||
Item_cond* on_icp= 0;
|
Item_cond* on_icp= 0;
|
||||||
@ -442,7 +442,8 @@ create_columnstore_derived_handler(THD* thd, TABLE_LIST *derived)
|
|||||||
|
|
||||||
// CROSS JOIN w/o conditions isn't supported until MCOL-301
|
// CROSS JOIN w/o conditions isn't supported until MCOL-301
|
||||||
// is ready.
|
// is ready.
|
||||||
if (join && join->table_count >= 2 && !join_preds_list.elements)
|
if (!unsupported_feature && join
|
||||||
|
&& join->table_count >= 2 && !join_preds_list.elements)
|
||||||
{
|
{
|
||||||
unsupported_feature= true;
|
unsupported_feature= true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user