summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/sql_class.h4
-rw-r--r--sql/sql_select.cc3
2 files changed, 2 insertions, 5 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 85ff901fe72..b6bf0dcdc45 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1325,12 +1325,10 @@ public:
bool using_indirect_summary_function;
/* If >0 convert all blob fields to varchar(convert_blob_length) */
uint convert_blob_length;
- bool need_const; /* <=> const items are saved in tmp table */
TMP_TABLE_PARAM()
:copy_field(0), group_parts(0),
- group_length(0), group_null_parts(0), convert_blob_length(0),
- need_const(0)
+ group_length(0), group_null_parts(0), convert_blob_length(0)
{}
~TMP_TABLE_PARAM()
{
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index fc85f49093d..1bde62276b8 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -5201,8 +5201,7 @@ 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 &&
- !param->need_const)
+ if (item->const_item() && (int) hidden_field_count <= 0)
continue; // We don't have to store this
}
if (type == Item::SUM_FUNC_ITEM && !group && !save_sum_fields)