[MDEV-10079] sql_yacc.yy: Remove non-parenthesized SELECT from table_ref Created: 2016-05-17 Updated: 2016-05-17 Resolved: 2016-05-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Fix Version/s: | 10.2.1 |
| Type: | Task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The "table_ref" rule allows non-parenthesized SELECT query. Non-parenthesized SELECT query is OK in derived_table_list, which is used (among other things) to handle derived tables in FROM clause:
But when table_ref is used in join_table, non-parenthesized SELECT should not be allowed:
Examples of bad queries:
Currently bad queries are caught by extra code:
Under terms of this task we'll disallow such queries syntactically, by moving non-parenthesized SELECT from table_ref to derived_table_list. |