[MDEV-14297] Lost name of a explicitly named CTE column used in a view created via prepared statement Created: 2017-11-06 Updated: 2018-04-22 Resolved: 2018-04-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.2.14 |
| Type: | Bug | Priority: | Major |
| Reporter: | Igor Babaev | Assignee: | Galina Shalygina (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The following demonstrates the problem:
Note that the definitions of v1 and v2 are identical. |
| Comments |
| Comment by Galina Shalygina (Inactive) [ 2018-02-18 ] | ||||||
|
The problem occurs as the With_element::rename_columns_of_derived_unit procedure doesn't allocate the CTE column names in a permanent MEMROOT for prepared statements and stored procedures. So the problem is more general and doesn't concern views only. The test below doesn't work also.
| ||||||
| Comment by Igor Babaev [ 2018-02-19 ] | ||||||
|
Ok to push into the 10.2 tree. | ||||||
| Comment by Galina Shalygina (Inactive) [ 2018-04-22 ] | ||||||
|
Pushed in 10.2 |