summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2003-05-13 19:26:07 +0300
committermonty@narttu.mysql.fi <>2003-05-13 19:26:07 +0300
commit2693203a08c72dcf87d0f8be49846530eba56666 (patch)
tree475f7895f8b8ca9b87712c500177e254a1b0e08e /sql
parent13530887cb09194adbe89d65277c59ffb71fdd15 (diff)
downloadmariadb-git-2693203a08c72dcf87d0f8be49846530eba56666.tar.gz
Fixed problem with ansi mode and GROUP BY with constants. (Bug #387)
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index daf388c9ff3..ff6fde1ca0c 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -6668,7 +6668,8 @@ setup_group(THD *thd,TABLE_LIST *tables,List<Item> &fields,
while ((item=li++))
{
- if (item->type() != Item::SUM_FUNC_ITEM && !item->marker)
+ if (item->type() != Item::SUM_FUNC_ITEM && !item->marker &&
+ !item->const_item())
{
my_printf_error(ER_WRONG_FIELD_WITH_GROUP,
ER(ER_WRONG_FIELD_WITH_GROUP),