Bug #8584 UNION with ORDER BY for each SELECT doesn't sorts correctly
Submitted: 17 Feb 2005 17:46 Modified: 17 Feb 2005 17:59
Reporter: Evgenii Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.9, 4.1.10 OS:Microsoft Windows (win2k)
Assigned to: CPU Architecture:Any

[17 Feb 2005 17:46] Evgenii
Description:
UNION with ORDER BY for each SELECT doesn't sorts at all

How to repeat:
Just send query like
(SELECT a FROM tbl_name WHERE a=10 AND B=1 ORDER BY a)
UNION
(SELECT a FROM tbl_name WHERE a=11 AND B=2 ORDER BY a);

Suggested fix:
I don't know. HELP ME!!!
[17 Feb 2005 17:59] Sinisa Milivojevic
Feature of having each SELECT node sorted differently was dropped recently.

It was dropped in order to circumvent some parsing problems with parenthesis in UNION's. 

This change in behaviour will be soon documented.