Bug #97149 S.O.S order by in sub query not working
| Submitted: | 8 Oct 2019 23:30 | Modified: | 9 Oct 2019 12:12 |
|---|---|---|---|
| Reporter: | musef habra | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 5.7.18 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | GROUP BY, order by, SUB QUERY | ||
[8 Oct 2019 23:30]
musef habra
[9 Oct 2019 10:35]
musef habra
when i add this =========> ,(Select @qqqq:=0) q it working !!!!!!! SELECT * FROM ( SELECT ID,IDPatient,ADate FROM abc i,(Select @qqqq:=0) q Where IDPatient=100033241 ORDER BY ADate DESC ) AS ii GROUP BY IDPatient;
[9 Oct 2019 12:12]
MySQL Verification Team
Hi Mr. habra, Thank you for your bug report. However, this is not a bug. We simply follow SQL standard on this issue. Order of the results from the nested query are irrelevant, since only the outermost node should be ordered, if specified so. However, it is not specified in the upper node. This is all described in our Reference Manual. Not a bug.
[9 Oct 2019 12:13]
MySQL Verification Team
Regarding your latest comment, it could be a bug, but in order to check it, you have to test it on the latest release of 5.7.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.055 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.