summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorunknown <sanja@montyprogram.com>2012-02-16 08:49:10 +0200
committerunknown <sanja@montyprogram.com>2012-02-16 08:49:10 +0200
commit607aab9c1d68a3b80bdb52a6c73fd6be1aa52764 (patch)
tree3e608459856b6def8c6067cf6b75af813d931585 /storage/myisam
parent764eeeee74f999fe2107fc362236563be0025093 (diff)
downloadmariadb-git-607aab9c1d68a3b80bdb52a6c73fd6be1aa52764.tar.gz
Counters for Index Condition Pushdown added (MDEV-130).
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/ha_myisam.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 5f1caa31b74..1f6e1fd6838 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -1770,12 +1770,18 @@ C_MODE_START
ICP_RESULT index_cond_func_myisam(void *arg)
{
ha_myisam *h= (ha_myisam*)arg;
+ THD *thd= ((TABLE*) h->file->external_ref)->in_use;
+ ICP_RESULT res;
if (h->end_range)
{
if (h->compare_key2(h->end_range) > 0)
return ICP_OUT_OF_RANGE; /* caller should return HA_ERR_END_OF_FILE already */
}
- return (ICP_RESULT) test(h->pushed_idx_cond->val_int());
+ status_var_increment(thd->status_var.ha_pushed_index_cond_checks);
+ if ((res= (ICP_RESULT) test(h->pushed_idx_cond->val_int())) ==
+ ICP_NO_MATCH)
+ status_var_increment(thd->status_var.ha_pushed_index_cond_filtered);
+ return res;
}
C_MODE_END