Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2(EOL)
-
None
Description
This code is now present, right before sending window function results out:
|
if (join_tab->window_funcs_step) |
{
|
Item **func_ptr= join_tab->tmp_table_param->items_to_copy;
|
Item *func;
|
for (; (func = *func_ptr) ; func_ptr++) |
{
|
if (func->with_window_func) // Without this if statement results are wrong for other items without win_funcs |
func->save_in_result_field(true); |
}
|
}
|
|
a + b, win_func(a+b) over () ...
fails without that last if statement. This should be investigated further to understand the exact reason why this works, and if it covers all use cases.
Later addition:
The "if" approach is inefficient. We should try to make it such that we have the "compiled" list at setup time and then just iterate over them directly. Check MDEV-11907 fix.
Attachments
Issue Links
- relates to
-
MDEV-11907 Bogus 'Division by 0' warnings upon using COUNT as a window function
- Closed