Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
10.4(EOL)
-
None
Description
@@version:
10.4.27-MariaDB-1:10.4.27+maria~ubu2004
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:
SELECT cause_id, |
COUNT(*) as cause_row_count, |
COUNT(*) OVER() as cause_count |
FROM test_db.test_run_log |
WHERE test_run_id = 1 |
GROUP BY cause_id |
-- HAVING COUNT(*) = 5
|
ORDER BY cause_id; |
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.