1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MariaDB 5.2 -> MariaDB 5.3 merge

This commit is contained in:
Sergey Petrunya
2010-06-26 14:05:41 +04:00
2077 changed files with 1016246 additions and 14858 deletions

View File

@ -92,7 +92,7 @@ handler::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
cost->zero();
cost->avg_io_cost= 1; /* assume random seeks */
if ((*flags & HA_MRR_INDEX_ONLY) && total_rows > 2)
cost->io_count= index_only_read_time(keyno, (uint)total_rows);
cost->io_count= keyread_read_time(keyno, n_ranges, (uint)total_rows);
else
cost->io_count= read_time(keyno, n_ranges, total_rows);
cost->cpu_cost= (double) total_rows / TIME_FOR_COMPARE + 0.01;
@ -147,7 +147,7 @@ ha_rows handler::multi_range_read_info(uint keyno, uint n_ranges, uint n_rows,
/* Produce the same cost as non-MRR code does */
if (*flags & HA_MRR_INDEX_ONLY)
cost->io_count= index_only_read_time(keyno, n_rows);
cost->io_count= keyread_read_time(keyno, n_ranges, n_rows);
else
cost->io_count= read_time(keyno, n_ranges, n_rows);
return 0;
@ -566,7 +566,7 @@ int DsMrr_impl::dsmrr_next(char **range_info)
if (h2->mrr_funcs.skip_record &&
h2->mrr_funcs.skip_record(h2->mrr_iter, (char *) cur_range_info, rowid))
continue;
res= h->rnd_pos(table->record[0], rowid);
res= h->ha_rnd_pos(table->record[0], rowid);
break;
} while (true);
@ -820,7 +820,7 @@ bool DsMrr_impl::get_disk_sweep_mrr_cost(uint keynr, ha_rows rows, uint flags,
cost->mem_cost= (double)rows_in_last_step * elem_size;
/* Total cost of all index accesses */
index_read_cost= h->index_only_read_time(keynr, (double)rows);
index_read_cost= h->keyread_read_time(keynr, 1, (double)rows);
cost->add_io(index_read_cost, 1 /* Random seeks */);
return FALSE;
}