1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-2178 Fix distinctAggregationAndGroupBy by allowing to traverse into

any function in projection looking for either aggregation function or
GROUP BY key column.

MDB doesn't convert Item_equal into corresponding Item_func_eq w/o
OPTIMIZER_SWITCH_COND_PUSHDOWN_FROM_HAVING optimizer flag.
Activation of the flag fixes queries from having test scenario w
equal operator in HAVING, e.g. HAVING c1 = 50.
This commit is contained in:
Roman Nozdrin
2019-09-19 08:06:39 +03:00
parent 975463c2ab
commit 69c1a613fa
2 changed files with 4 additions and 6 deletions

View File

@ -26,7 +26,8 @@ void mutate_optimizer_flags(THD *thd_)
set_original_optimizer_flags(thd_->variables.optimizer_switch, thd_);
thd_->variables.optimizer_switch = OPTIMIZER_SWITCH_IN_TO_EXISTS |
OPTIMIZER_SWITCH_EXISTS_TO_IN |
OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_DERIVED;
OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_DERIVED |
OPTIMIZER_SWITCH_COND_PUSHDOWN_FROM_HAVING;
}
void restore_optimizer_flags(THD *thd_)