diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-02-25 15:57:08 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-02-26 08:32:02 +0100 |
commit | 82da98556cf58f0fbb43c82e9c6ae1a887b6cf3d (patch) | |
tree | 440df4bbd36734804eccafeb7bfba818ce158338 /sql/sql_select.cc | |
parent | 50b3632fa434e6bf836830365f664b67ff989279 (diff) | |
download | mariadb-git-82da98556cf58f0fbb43c82e9c6ae1a887b6cf3d.tar.gz |
MDEV-18605: Loss of column aliases by using view and group
Preserv column name with copy fields even if it is function and Co.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 439853c2f66..0bc27f18d47 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -23914,7 +23914,9 @@ setup_copy_fields(THD *thd, TMP_TABLE_PARAM *param, real_pos->type() == Item::COND_ITEM) && !real_pos->with_sum_func) { // Save for send fields + LEX_CSTRING real_name= pos->name; pos= real_pos; + pos->name= real_name; /* TODO: In most cases this result will be sent to the user. This should be changed to use copy_int or copy_real depending |