Skip to content
Permalink
Browse files

MDEV-18479: Avoid COST_MULT(records, 1)

  • Loading branch information...
dr-m committed Jun 11, 2019
1 parent 96ee9ea commit 7a7d9904e12335ee8b1eea9671138b3c469a3829
Showing with 2 additions and 5 deletions.
  1. +2 −5 sql/sql_select.cc
@@ -3856,11 +3856,8 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
table/view.
*/
for (i= 0; i < join->table_count ; i++)
{
records= COST_MULT(records,
join->best_positions[i].records_read ?
join->best_positions[i].records_read : 1);
}
if (double rr= join->best_positions[i].records_read)
records= COST_MULT(records, rr);
ha_rows rows= records > HA_ROWS_MAX ? HA_ROWS_MAX : (ha_rows) records;
set_if_smaller(rows, unit->select_limit_cnt);
join->select_lex->increase_derived_records(rows);

0 comments on commit 7a7d990

Please sign in to comment.
You can’t perform that action at this time.