forked from archlinux/svntogit-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-18605: Loss of column aliases by using view and group git-svn-id: file:///srv/repos/svn-packages/svn@346965 eb2447ed-0c53-47e4-bac8-5bc4a241df78
- Loading branch information
eworm
committed
Mar 1, 2019
1 parent
ce27766
commit 5a973e8
Showing
2 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
mariadb/trunk/0007-MDEV-18605-Loss-of-column-aliases-by-using-view-and-.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
From 82da98556cf58f0fbb43c82e9c6ae1a887b6cf3d Mon Sep 17 00:00:00 2001 | ||
From: Oleksandr Byelkin <[email protected]> | ||
Date: Mon, 25 Feb 2019 15:57:08 +0100 | ||
Subject: [PATCH 2/2] MDEV-18605: Loss of column aliases by using view and | ||
group | ||
|
||
Preserv column name with copy fields even if it is function and Co. | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters