mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-21318: Wrong results with window functions and implicit grouping
The issue here is for degenerate joins we should execute the window function but it is not getting executed in all the cases. To get the window function values window function needs to be executed always. This currently does not happen in few cases where the join would return 0 or 1 row like 1) IMPOSSIBLE WHERE 2) MIN/MAX optimization 3) EMPTY CONST TABLE The fix is to make sure that window functions get executed and the temporary table is setup for the execution of window functions
This commit is contained in:
@ -1057,6 +1057,7 @@ protected:
|
||||
void restore_query_plan(Join_plan_state *restore_from);
|
||||
/* Choose a subquery plan for a table-less subquery. */
|
||||
bool choose_tableless_subquery_plan();
|
||||
void handle_implicit_grouping_with_window_funcs();
|
||||
|
||||
public:
|
||||
JOIN_TAB *join_tab, **best_ref;
|
||||
|
Reference in New Issue
Block a user