[MDEV-25398] Inconsistent name resolution with subquery in HAVING clause Created: 2021-04-13 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer, Views |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Set to Minor because the queries are silly, probably both are incorrect and should be rejected.
The difference between two SELECTs is that the first one uses the view, while the second one uses the table. The first one works, the second one fails:
On MySQL both fail, although with different errors:
|
| Comments |
| Comment by Sergei Petrunia [ 2021-04-13 ] | |||||||
|
elenst, one can easily create a testcase that shows the same behavior and does not use JSON_TABLE:
| |||||||
| Comment by Sergei Petrunia [ 2021-04-13 ] | |||||||
|
Also, the second query doesn't honor the ONLY_FULL_GROUP_BY mode:
|