summaryrefslogtreecommitdiff
path: root/sql/multi_range_read.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-02-22 16:48:29 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-02-22 16:48:29 +0400
commit59b2bb9aca0fb037ab4c770a8fd684a3d4a40587 (patch)
tree03b80603727eb6ad72737bdbe2d1b1b59fc81739 /sql/multi_range_read.cc
parentc299e027eeddc35e0197ebc70805e0a303a4b135 (diff)
downloadmariadb-git-59b2bb9aca0fb037ab4c770a8fd684a3d4a40587.tar.gz
Added back MRR counters. The new names are: Handler_mrr_init,
Handler_mrr_key_refills, Handler_mrr_rowid_refills.
Diffstat (limited to 'sql/multi_range_read.cc')
-rw-r--r--sql/multi_range_read.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc
index 6ecc64207de..e86c9ca251c 100644
--- a/sql/multi_range_read.cc
+++ b/sql/multi_range_read.cc
@@ -510,7 +510,7 @@ int Mrr_ordered_index_reader::refill_buffer(bool initial)
{
/* This is a non-initial buffer fill and we've got a non-empty buffer */
THD *thd= current_thd;
- status_var_increment(thd->status_var.ha_mrr_extra_key_sorts);
+ status_var_increment(thd->status_var.ha_mrr_key_refills_count);
}
key_buffer->sort((key_buffer->type() == Lifo_buffer::FORWARD)?
@@ -610,7 +610,7 @@ int Mrr_ordered_rndpos_reader::refill_buffer(bool initial)
{
/* Ok, this was a successful buffer refill operation */
THD *thd= current_thd;
- status_var_increment(thd->status_var.ha_mrr_extra_rowid_sorts);
+ status_var_increment(thd->status_var.ha_mrr_rowid_refills_count);
}
DBUG_RETURN(res);
@@ -845,8 +845,6 @@ int DsMrr_impl::dsmrr_init(handler *h_arg, RANGE_SEQ_IF *seq_funcs,
strategy= disk_strategy= &reader_factory.ordered_rndpos_reader;
}
- status_var_increment(thd->status_var.ha_multi_range_read_init_count);
-
full_buf= buf->buffer;
full_buf_end= buf->buffer_end;
@@ -936,6 +934,12 @@ int DsMrr_impl::dsmrr_init(handler *h_arg, RANGE_SEQ_IF *seq_funcs,
goto error;
}
}
+
+ /*
+ At this point, we're sure that we're running a native MRR scan (i.e. we
+ didnt fall back to default implementation for some reason).
+ */
+ status_var_increment(thd->status_var.ha_mrr_init_count);
res= strategy->refill_buffer(TRUE);
if (res)