From 3fcc4f6fc24e8bde2f7d3a6aa162d69554bf8e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Sun, 7 Mar 2021 13:07:10 +0200 Subject: [PATCH] cleanup: make_aggr_tables_info pass parameters from existing local variables Local variables such as keep_row_order are semantically clearer on the intent, rather than using an or condition twice. --- sql/sql_select.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 927be6898e3..5cd3f88352a 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3308,10 +3308,10 @@ bool JOIN::make_aggr_tables_info() DBUG_RETURN(1); TABLE* table= create_tmp_table(thd, curr_tab->tmp_table_param, all_fields, - NULL, query.distinct, + NULL, distinct, TRUE, select_options, HA_POS_ERROR, &empty_clex_str, !need_tmp, - query.order_by || query.group_by); + keep_row_order); if (!table) DBUG_RETURN(1);