Bug #82559 a bug about union with subquery
| Submitted: | 12 Aug 2016 3:08 | Modified: | 12 Aug 2016 8:07 |
|---|---|---|---|
| Reporter: | 帅 Bang | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S2 (Serious) |
| Version: | 5.6, 5.7.14, 5.6.32 | OS: | Linux |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | subquery partition union | ||
[12 Aug 2016 3:08]
帅 Bang
[12 Aug 2016 8:07]
MySQL Verification Team
Hello Bang, Thank you for the report and test case. Observed this with 5.6.32/5.7.14 builds. Thanks, Umesh
[16 Aug 2016 20:12]
Roy Lyseng
Hi, in some cases, we optimize away ordering expressions that do not make a difference to the overall query processing. When doing that, we also skip subqueries in such expressions, so error messages like these are not issued. We think that the optimizer has liberty to do that. That said, we should eliminate ordering expressions only for UNION DISTINCT queries and not UNION ALL (like this one). Although no guarantee is given by SQL for the final ordering, we should adhere to the ORDER BY clauses and output the union components in partial order. In my opinion, this is the true error here.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.051 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.