diff options
author | unknown <sanja@montyprogram.com> | 2012-02-16 08:49:10 +0200 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2012-02-16 08:49:10 +0200 |
commit | 607aab9c1d68a3b80bdb52a6c73fd6be1aa52764 (patch) | |
tree | 3e608459856b6def8c6067cf6b75af813d931585 /storage/maria | |
parent | 764eeeee74f999fe2107fc362236563be0025093 (diff) | |
download | mariadb-git-607aab9c1d68a3b80bdb52a6c73fd6be1aa52764.tar.gz |
Counters for Index Condition Pushdown added (MDEV-130).
Diffstat (limited to 'storage/maria')
-rw-r--r-- | storage/maria/ha_maria.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 92b2a965706..bee7888eb5d 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -2248,12 +2248,18 @@ C_MODE_START ICP_RESULT index_cond_func_maria(void *arg) { ha_maria *h= (ha_maria*)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 h->pushed_idx_cond->val_int() ? ICP_MATCH : ICP_NO_MATCH; + status_var_increment(thd->status_var.ha_pushed_index_cond_checks); + if ((res= h->pushed_idx_cond->val_int() ? ICP_MATCH : ICP_NO_MATCH) == + ICP_NO_MATCH) + status_var_increment(thd->status_var.ha_pushed_index_cond_filtered); + return res; } C_MODE_END |