[MDEV-19039] Wrong result from query, using window function and GROUP BY .. WITH ROLLUP Created: 2019-03-25 Updated: 2023-12-07 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alice Sherepa | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
|
| Comments |
| Comment by Alice Sherepa [ 2019-03-28 ] | |||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||
| Comment by Varun Gupta (Inactive) [ 2020-07-10 ] | |||||||||||||||||||||||||||||||
|
Here trying a query without window function with ROLLUP
So even here the second column i returns the incorrect value. It should be NULL according to my understanding. | |||||||||||||||||||||||||||||||
| Comment by Varun Gupta (Inactive) [ 2020-07-10 ] | |||||||||||||||||||||||||||||||
|
The above limitation is something that we can see with the window function too.
In the prepare phase of the query the elements in the ORDER BY list of the window function are added to the all_fields list. But currently there is no implementation to show that the same column i added from the ORDER BY list is part of the GROUP BY clause also. |