summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2017-12-20 12:51:57 +0200
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2017-12-20 12:51:57 +0200
commit042f763268c0f209e7c12e0a6a72bb5d204dfe29 (patch)
tree7ee15ab50af97cab4135f3712f95ac12fafc74c5 /sql/item.cc
parentcb121a047b55403fe271570c928fd95ed64a1c8f (diff)
parent924db8b4ed3f268cbe91a1734611f4dc2311c7be (diff)
downloadmariadb-git-042f763268c0f209e7c12e0a6a72bb5d204dfe29.tar.gz
Merge remote-tracking branch '5.5' into 10.0
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc
index a99bef5d904..3b8ca94642e 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -4733,7 +4733,8 @@ resolve_ref_in_select_and_group(THD *thd, Item_ident *ref, SELECT_LEX *select)
if (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY &&
select->having_fix_field &&
- select_ref != not_found_item && !group_by_ref)
+ select_ref != not_found_item && !group_by_ref &&
+ !ref->alias_name_used)
{
/*
Report the error if fields was found only in the SELECT item list and