diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item.cc b/sql/item.cc index 5840e4a4081..4fa0e7d5906 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2010, 2017, MariaDB + Copyright (c) 2010, 2017, MariaDB Corporation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -5027,7 +5027,7 @@ static Item** find_field_in_group_list(Item *find_item, ORDER *group_list) int cur_match_degree= 0; /* SELECT list element with explicit alias */ - if ((*(cur_group->item))->name.str && + if ((*(cur_group->item))->name.str && !table_name && !(*(cur_group->item))->is_autogenerated_name && !lex_string_cmp(system_charset_info, &(*(cur_group->item))->name, field_name)) |