[MDEV-30890] HAVING clause causes ORDER BY statement to fail when window function in use Created: 2023-03-20 Updated: 2023-06-18 Resolved: 2023-06-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions |
| Affects Version/s: | 10.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | James Kevin O'Halloran | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Description |
|
@@version: The following query honors the ORDER BY statement when the HAVING clause is commented out, but ignores the ORDER BY statement when the HAVING clause is not commented out:
NOTE that when window OVER function column is commented out, and the HAVING clause is not commented out, the ordering of rows are as expected. |
| Comments |
| Comment by James Kevin O'Halloran [ 2023-03-20 ] | ||||||||||||||||
|
partial output when HAVING clause is NOT commented out:
When the HAVING clause is commented out, ordering is as expected. | ||||||||||||||||
| Comment by Sergei Golubchik [ 2023-05-19 ] | ||||||||||||||||
|
could you please provide some sample data to help us to repeat this bug? It seems to be data dependent. |