MDEV-18479: Avoid COST_MULT(records, 1)
This commit is contained in:
parent
96ee9ea02e
commit
7a7d9904e1
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user