[MDEV-13158] Error in subquery not causing outer query to fail Created: 2017-06-22 Updated: 2017-06-23 Resolved: 2017-06-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Subquery |
| Affects Version/s: | 10.0.27 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Jason Johnson | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
MariaDB on Amazon AWS (Ubuntu 16.04.1 LTS) |
||
| Description |
|
The following query doesn't return an error from the SQL engine:
In this case, "table2" doesn't contain a column named 'col2'. But the query still runs and returns empty set. |
| Comments |
| Comment by Sergei Golubchik [ 2017-06-23 ] | ||||||||||||||||
|
Does table1 have col2 column? If yes, that's what you select. Show the table1 definition please. | ||||||||||||||||
| Comment by Jason Johnson [ 2017-06-23 ] | ||||||||||||||||
|
Sorry, let me revise the query as follows:
The definitions are:
| ||||||||||||||||
| Comment by Sergei Golubchik [ 2017-06-23 ] | ||||||||||||||||
|
Right, so it's not a bug. If in doubt, please check the manual or any SQL book about how name resolution in subqueries work. |