Outer ORDER BY clause has no effect [CORE2871] #3255
Labels
affect-version: 2.1.0
affect-version: 2.1.1
affect-version: 2.1.2
affect-version: 2.1.3
affect-version: 2.5 Alpha 1
affect-version: 2.5 Beta 1
affect-version: 2.5 Beta 2
affect-version: 2.5 RC1
affect-version: 2.5 RC2
affect-version: 3.0 Initial
component: engine
fix-version: 2.0.6
fix-version: 2.1.4
fix-version: 2.5 RC3
fix-version: 3.0 Alpha 1
priority: major
qa: done successfully
type: bug
Submitted by: @dyemanov
Is related to CORE1089
Is related to QA254
If a derived table (or a view) contains both a left/right join and an ORDER BY clause and the outer query also contains an ORDER BY clause, the latter one gets ignored.
Test query against the EMPLOYEE sample database:
select *
from (
select
emp_no, first_name, last_name, country, currency
from employee
left join country on employee.job_country = country.country
order by last_name
)
order by emp_no desc
The result is ordered by "last_name".
Commits: 3aaa3d1 98e83cd 99ccecb f815326
The text was updated successfully, but these errors were encountered: