[MDEV-18605] Loss of column aliases by using view and group Created: 2019-02-16 Updated: 2020-08-25 Resolved: 2019-02-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Views |
| Affects Version/s: | 10.3.11, 10.3.12, 10.3, 10.4 |
| Fix Version/s: | 10.3.14, 10.4.4 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Friedemann Schmidt | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 4 |
| Labels: | alias, group, views | ||
| Environment: |
windows 10 |
||
| Description |
|
hello, upgrade from 10.2 to 10.3 due to a crash in some of my stored procedures. Since the upgrade from 10.2 to 10.3, the column name is output incorrectly if the column is formed in the view using a function and is used WHERE- and GROUP BY-statements in the query. I tested it on a Server with 10.2: in all cases the output is "bar" as column-name
|
| Comments |
| Comment by Alice Sherepa [ 2019-02-18 ] |
|
Thanks for the report! |
| Comment by Alex Boag-Munroe [ 2019-02-22 ] |
|
Added a vote for this issue as we've just seen the same thing when aliasing a column from a VIEW. Starts in 10.3.1 (was unable to install 10.3.0) but is fine in all other versions up to 10.2 latest. |
| Comment by Alex Boag-Munroe [ 2019-02-22 ] |
|
In our tests, simply using GROUP BY breaks the alias (but if you GROUP BY on the alias, it works again). |
| Comment by Oleksandr Byelkin [ 2019-02-25 ] |
|
revision-id: dee4b76f607ca4ce6bec6338f1a29f742dd64601 (mariadb-10.3.12-66-gdee4b76f607)
Preserv column name with copy fields even if it is function and Co. — |
| Comment by Alexander Barkov [ 2019-02-26 ] |
|
The patch dee4b76f607ca4ce6bec6338f1a29f742dd64601 is OK to push. |