1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-2178 CS now sets optimizer flags like it did in the fork-era.

This happens in external_lock() whilst locking the table.

Fixes LIMIT=1 optimization for EXISTS_SUBS subqueries.

external_lock() contains if condition that gives false positive
for SH + pushed conditions.

external_lock() now resets in_subquery_conversion_threshold
variable that governs IN_INTO_SUBQUERY optimization for
queries run in table mode.

external_lock() now purges dynamicall allocated condInfo for
SH and DH execution path.

Commented out UNION check b/c if condition gives false positives
and silently enables table mode execution for queries w/o
UNION.
This commit is contained in:
Roman Nozdrin
2019-09-13 06:29:55 -05:00
committed by root
parent 0852e316f8
commit 0c58f10d12
7 changed files with 42 additions and 29 deletions

View File

@ -7779,8 +7779,9 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
hash join, giving less number of rows in the output result set than expected.
We therefore do not allow limit set to 1 here for such queries.
*/
if (gwi.subSelectType != CalpontSelectExecutionPlan::IN_SUBS &&
select_lex.master_unit()->global_parameters()->explicit_limit)
if (gwi.subSelectType != CalpontSelectExecutionPlan::IN_SUBS
&& gwi.subSelectType != CalpontSelectExecutionPlan::EXISTS_SUBS
&& select_lex.master_unit()->global_parameters()->explicit_limit)
{
if (select_lex.master_unit()->global_parameters()->offset_limit)
{