Allow derived tables in VIEWS

Description

mysql> CREATE VIEW v3 AS SELECT * FROM (SELECT s1 FROM t1) AS x;
ERROR 1349 (HY000): View's SELECT contains a subquery in the FROM clause

See http://bugs.mysql.com/bug.php?id=16757
and http://bugs.mysql.com/bug.php?id=12755

specifically Eric Bergen's comments about the complexity of removing this restriction. It should be doable without too much hassle, and as we can see from the comments, it would resolve a lot of issues for people.

Environment

None

Status

Assignee

Oleksandr Byelkin

Reporter

Arjen Lentz

Labels

None

External issue ID

None

External issue ID

None

Time tracking

80h

Sprint

Fix versions

Affects versions

10.0.0
5.2.13
5.3.11
5.5.28a
5.1.62

Priority

Major