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.