Commit 7a7d9904 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-18479: Avoid COST_MULT(records, 1)

parent 96ee9ea0
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment