summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorigor@rurik.mysql.com <>2005-07-28 19:11:29 -0700
committerigor@rurik.mysql.com <>2005-07-28 19:11:29 -0700
commita5f2c7528c9d6238bcd80d8616b29fcf582ae6a9 (patch)
tree8e54c9874df89c6e578ffdefa6b2843f8bcf9b37 /sql/sql_select.cc
parentf503c4152de0b45d6780d1c669988810055c0fa9 (diff)
downloadmariadb-git-a5f2c7528c9d6238bcd80d8616b29fcf582ae6a9.tar.gz
func_gconcat.result, func_gconcat.test:
Added a test case for bug #12095. sql_class.h: Fixed bug #12095: a join query with GROUP_CONCAT over a single row table. Added a flag to the TMP_TABLE_PARAM class forcing to put constant items generated after elimination of a single row table into temp table in some cases (e.g. when GROUP_CONCAT is calculated over a single row table). bk ci sql/item_sum.cc Fixed bug #12095: a join query with GROUP_CONCAT over a single row table. If GROUP_CONCAT is calculated we always put its argument into a temp table, even when the argument is a constant item. sql_select.cc: Fixed bug #12095: a join query with GROUP_CONCAT over one row table. If temp table is used to calculate GROUP_CONCAT the argument should be always put into this table, even when it is a constant item.
Diffstat (limited to 'sql/sql_select.cc')
-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 1bde62276b8..fc85f49093d 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -5201,7 +5201,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
param->using_indirect_summary_function=1;
continue;
}
- if (item->const_item() && (int) hidden_field_count <= 0)
+ if (item->const_item() && (int) hidden_field_count <= 0 &&
+ !param->need_const)
continue; // We don't have to store this
}
if (type == Item::SUM_FUNC_ITEM && !group && !save_sum_fields)