You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-2178 Fix for handlers fallback mechanism patch.
I returned if predicate that guards FE-BE initial connection
block. This predicated had been removed by accident in cb36041
Since we switched to internal ORDER BY FE now reduces the
default limit value to uint64-2 this broke a predicate check
for correlated subqueries. I replaced a predicate with more
reasonable to avoid false positives.
This commit is contained in:
@ -7865,8 +7865,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We don't currently support limit with correlated subquery
|
// We don't currently support limit with correlated subquery
|
||||||
if (csep->limitNum() != (uint64_t) - 1 &&
|
if (gwi.subQuery && !gwi.correlatedTbNameVec.empty() && csep->hasOrderBy())
|
||||||
gwi.subQuery && !gwi.correlatedTbNameVec.empty())
|
|
||||||
{
|
{
|
||||||
gwi.fatalParseError = true;
|
gwi.fatalParseError = true;
|
||||||
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_LIMIT_SUB);
|
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_LIMIT_SUB);
|
||||||
|
@ -5319,6 +5319,8 @@ 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 || !ti.tpl_scan_ctx || (hndl && hndl->queryState == sm::NO_QUERY))
|
||||||
|
{
|
||||||
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();
|
||||||
@ -5365,6 +5367,7 @@ int ha_cs_impl_select_next(uchar* buf, TABLE* table)
|
|||||||
}
|
}
|
||||||
ci->tableMap[table] = ti;
|
ci->tableMap[table] = ti;
|
||||||
hndl->queryState= sm::QUERY_IN_PROCESS;
|
hndl->queryState= sm::QUERY_IN_PROCESS;
|
||||||
|
}
|
||||||
|
|
||||||
if (!ti.tpl_ctx || !ti.tpl_scan_ctx)
|
if (!ti.tpl_ctx || !ti.tpl_scan_ctx)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user