diff --git a/sql/sql_select.cc b/sql/sql_select.cc index cef88c95142..a50a5b5e10a 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -530,7 +530,6 @@ void JOIN::init(THD *thd_arg, List &fields_arg, simple_order= 0; simple_group= 0; ordered_index_usage= ordered_index_void; - need_distinct= 0; skip_sort_order= 0; with_two_phase_optimization= 0; save_qep= 0; @@ -2247,7 +2246,6 @@ JOIN::optimize_inner() do_send_rows = (unit->lim.get_select_limit()) ? 1 : 0; set_allowed_join_cache_types(); - need_distinct= TRUE; Json_writer_object trace_wrapper(thd); Json_writer_object trace_prepare(thd, "join_optimization"); @@ -3589,7 +3587,6 @@ int JOIN::optimize_stage2() tmp_table_param.precomputed_group_by= TRUE; if (join_tab->is_using_agg_loose_index_scan()) { - need_distinct= FALSE; tmp_table_param.precomputed_group_by= FALSE; } } diff --git a/sql/sql_select.h b/sql/sql_select.h index 805026967a0..3f42496d6b4 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -1609,7 +1609,6 @@ public: group_list) */ bool group; - bool need_distinct; /** Indicates that grouping will be performed on the result set during