[MDEV-10037] UNION with LIMIT ROWS EXAMINED does not require parentheses Created: 2016-05-06 Updated: 2016-05-21 Resolved: 2016-05-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Affects Version/s: | 10.1, 10.2 |
| Fix Version/s: | 10.2.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
10.1 disallowed use of non-parenthesized UNION parts that have ORDER or LIMIT clauses, according to the SQL Standard. That was a merge from MySQL-5.6. This script:
returns an error starting from 10.1:
However, if I use LIMIT in combination with ROWS EXAMINED:
it returns a result instead of an error:
It should be fixed to require parentheses as well, like in case of a "normal" LIMIT clause. Most likely, LIMIT ROWS EXAMINED was just forgotten during the merge. The documentation at:
|