[MDEV-10058] Suspicious EXPLAIN output for a derived table + WITH + joined table Created: 2016-05-12 Updated: 2016-09-07 Resolved: 2016-09-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer - CTE |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.2.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | CTE | ||
| Issue Links: |
|
||||||||
| Description |
|
This script:
returns
This looks wrong. The table "t1" does not affect the result and should probably be optimized away. |
| Comments |
| Comment by Alexander Barkov [ 2016-05-12 ] | ||||||||||
|
By the way, this syntax is not standard:
<with clause> cannot be followed by a <parenthesized joined table>. The correct standard syntax is:
And EXPLAIN for this standard query crashes. See | ||||||||||
| Comment by Sergei Petrunia [ 2016-09-04 ] | ||||||||||
|
On the current 10.2 tree:
| ||||||||||
| Comment by Sergei Petrunia [ 2016-09-04 ] | ||||||||||
|
So,
| ||||||||||
| Comment by Sergei Petrunia [ 2016-09-04 ] | ||||||||||
|
Closing as all issues seem to have been resolved. |