diff options
-rw-r--r-- | mysql-test/include/icp_tests.inc | 6 | ||||
-rw-r--r-- | mysql-test/r/innodb_icp.result | 18 | ||||
-rw-r--r-- | mysql-test/r/join_cache.result | 24 | ||||
-rw-r--r-- | mysql-test/r/maria_icp.result | 18 | ||||
-rw-r--r-- | mysql-test/r/myisam_icp.result | 18 | ||||
-rw-r--r-- | mysql-test/r/status.result | 8 | ||||
-rw-r--r-- | mysql-test/r/status_user.result | 4 | ||||
-rw-r--r-- | mysql-test/t/join_cache.test | 8 | ||||
-rw-r--r-- | sql/handler.cc | 6 | ||||
-rw-r--r-- | sql/mysqld.cc | 4 | ||||
-rw-r--r-- | sql/sql_class.h | 4 | ||||
-rw-r--r-- | sql/sql_join_cache.cc | 12 |
12 files changed, 65 insertions, 65 deletions
diff --git a/mysql-test/include/icp_tests.inc b/mysql-test/include/icp_tests.inc index f412843ded0..e84b8622cdb 100644 --- a/mysql-test/include/icp_tests.inc +++ b/mysql-test/include/icp_tests.inc @@ -862,15 +862,15 @@ CREATE TABLE t1 ( INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5'); flush status; -show status like "Handler_pushed%"; +show status like "Handler_icp%"; SELECT * FROM t1 FORCE INDEX(c1) WHERE (c1='3' or c1='4') and c1 % 2 = 0 ; -show status like "Handler_pushed%"; +show status like "Handler_icp%"; SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ; -show status like "Handler_pushed%"; +show status like "Handler_icp%"; DROP TABLE t1; diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result index d8e41113f63..2817f83bed5 100644 --- a/mysql-test/r/innodb_icp.result +++ b/mysql-test/r/innodb_icp.result @@ -816,24 +816,24 @@ KEY (c1) ); INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5'); flush status; -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 0 -Handler_pushed_index_cond_filtered 0 +Handler_icp_attempts 0 +Handler_icp_match 0 SELECT * FROM t1 FORCE INDEX(c1) WHERE (c1='3' or c1='4') and c1 % 2 = 0 ; c1 c2 4 4 -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 2 -Handler_pushed_index_cond_filtered 1 +Handler_icp_attempts 2 +Handler_icp_match 1 SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ; c1 c2 4 4 -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 2 -Handler_pushed_index_cond_filtered 1 +Handler_icp_attempts 2 +Handler_icp_match 1 DROP TABLE t1; set optimizer_switch=@innodb_icp_tmp; set storage_engine= @save_storage_engine; diff --git a/mysql-test/r/join_cache.result b/mysql-test/r/join_cache.result index 6908f40e854..9918ad2380d 100644 --- a/mysql-test/r/join_cache.result +++ b/mysql-test/r/join_cache.result @@ -3520,10 +3520,10 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition(BKA); Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 20 -Handler_pushed_index_cond_filtered 16 +Handler_icp_attempts 20 +Handler_icp_match 4 set join_cache_level=6; select t2.f1, t2.f2, t2.f3 from t1,t2 where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1; @@ -3537,10 +3537,10 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition(BKA); Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 40 -Handler_pushed_index_cond_filtered 32 +Handler_icp_attempts 40 +Handler_icp_match 8 set join_cache_level=7; select t2.f1, t2.f2, t2.f3 from t1,t2 where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1; @@ -3554,10 +3554,10 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition(BKA); Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 60 -Handler_pushed_index_cond_filtered 48 +Handler_icp_attempts 60 +Handler_icp_match 12 set join_cache_level=8; select t2.f1, t2.f2, t2.f3 from t1,t2 where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1; @@ -3571,10 +3571,10 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition(BKA); Using where; Using join buffer (flat, BKAH join); Key-ordered Rowid-ordered scan -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 80 -Handler_pushed_index_cond_filtered 64 +Handler_icp_attempts 80 +Handler_icp_match 16 drop table t1,t2; set join_cache_level=default; # diff --git a/mysql-test/r/maria_icp.result b/mysql-test/r/maria_icp.result index b9d3ca6c7c0..97b10fe496c 100644 --- a/mysql-test/r/maria_icp.result +++ b/mysql-test/r/maria_icp.result @@ -822,24 +822,24 @@ KEY (c1) ); INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5'); flush status; -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 0 -Handler_pushed_index_cond_filtered 0 +Handler_icp_attempts 0 +Handler_icp_match 0 SELECT * FROM t1 FORCE INDEX(c1) WHERE (c1='3' or c1='4') and c1 % 2 = 0 ; c1 c2 4 4 -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 2 -Handler_pushed_index_cond_filtered 1 +Handler_icp_attempts 2 +Handler_icp_match 1 SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ; c1 c2 4 4 -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 2 -Handler_pushed_index_cond_filtered 1 +Handler_icp_attempts 2 +Handler_icp_match 1 DROP TABLE t1; set storage_engine= @save_storage_engine; set optimizer_switch=@maria_icp_tmp; diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result index d7442608b59..85a2ad921c6 100644 --- a/mysql-test/r/myisam_icp.result +++ b/mysql-test/r/myisam_icp.result @@ -820,24 +820,24 @@ KEY (c1) ); INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5'); flush status; -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 0 -Handler_pushed_index_cond_filtered 0 +Handler_icp_attempts 0 +Handler_icp_match 0 SELECT * FROM t1 FORCE INDEX(c1) WHERE (c1='3' or c1='4') and c1 % 2 = 0 ; c1 c2 4 4 -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 2 -Handler_pushed_index_cond_filtered 1 +Handler_icp_attempts 2 +Handler_icp_match 1 SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ; c1 c2 4 4 -show status like "Handler_pushed%"; +show status like "Handler_icp%"; Variable_name Value -Handler_pushed_index_cond_checks 2 -Handler_pushed_index_cond_filtered 1 +Handler_icp_attempts 2 +Handler_icp_match 1 DROP TABLE t1; drop table if exists t0, t1, t1i, t1m; # diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result index e75cabe0e58..b5bae659eed 100644 --- a/mysql-test/r/status.result +++ b/mysql-test/r/status.result @@ -275,9 +275,9 @@ Variable_name Value Handler_commit 0 Handler_delete 0 Handler_discover 0 +Handler_icp_attempts 0 +Handler_icp_match 0 Handler_prepare 0 -Handler_pushed_index_cond_checks 0 -Handler_pushed_index_cond_filtered 0 Handler_read_first 0 Handler_read_key 4 Handler_read_next 0 @@ -312,9 +312,9 @@ Variable_name Value Handler_commit 0 Handler_delete 0 Handler_discover 0 +Handler_icp_attempts 0 +Handler_icp_match 0 Handler_prepare 0 -Handler_pushed_index_cond_checks 0 -Handler_pushed_index_cond_filtered 0 Handler_read_first 0 Handler_read_key 2 Handler_read_next 2 diff --git a/mysql-test/r/status_user.result b/mysql-test/r/status_user.result index 175839b2098..be0cfef79dc 100644 --- a/mysql-test/r/status_user.result +++ b/mysql-test/r/status_user.result @@ -100,9 +100,9 @@ Variable_name Value Handler_commit 19 Handler_delete 1 Handler_discover 0 +Handler_icp_attempts 0 +Handler_icp_match 0 Handler_prepare 18 -Handler_pushed_index_cond_checks 0 -Handler_pushed_index_cond_filtered 0 Handler_read_first 0 Handler_read_key 3 Handler_read_next 0 diff --git a/mysql-test/t/join_cache.test b/mysql-test/t/join_cache.test index 6cb8f48bd70..0962f1bf766 100644 --- a/mysql-test/t/join_cache.test +++ b/mysql-test/t/join_cache.test @@ -1533,7 +1533,7 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1; explain select t2.f1, t2.f2, t2.f3 from t1,t2 where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2; -show status like "Handler_pushed%"; +show status like "Handler_icp%"; set join_cache_level=6; select t2.f1, t2.f2, t2.f3 from t1,t2 @@ -1541,7 +1541,7 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1; explain select t2.f1, t2.f2, t2.f3 from t1,t2 where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2; -show status like "Handler_pushed%"; +show status like "Handler_icp%"; set join_cache_level=7; select t2.f1, t2.f2, t2.f3 from t1,t2 @@ -1549,7 +1549,7 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1; explain select t2.f1, t2.f2, t2.f3 from t1,t2 where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2; -show status like "Handler_pushed%"; +show status like "Handler_icp%"; set join_cache_level=8; select t2.f1, t2.f2, t2.f3 from t1,t2 @@ -1557,7 +1557,7 @@ where t1.f1=t2.f1 and t2.f2 between t1.f1 and t1.f2 and t2.f2 + 1 >= t1.f1 + 1; explain select t2.f1, t2.f2, t2.f3 from t1,t2 where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2; -show status like "Handler_pushed%"; +show status like "Handler_icp%"; drop table t1,t2; set join_cache_level=default; diff --git a/sql/handler.cc b/sql/handler.cc index 4a8cd77ebc3..04f10586484 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -4569,10 +4569,10 @@ extern "C" enum icp_result handler_index_cond_check(void* h_arg) if (h->end_range && h->compare_key2(h->end_range) > 0) return ICP_OUT_OF_RANGE; - h->increment_statistics(&SSV::ha_pushed_index_cond_checks); + h->increment_statistics(&SSV::ha_icp_attempts); if ((res= h->pushed_idx_cond->val_int()? ICP_MATCH : ICP_NO_MATCH) == - ICP_NO_MATCH) - h->increment_statistics(&SSV::ha_pushed_index_cond_filtered); + ICP_MATCH) + h->increment_statistics(&SSV::ha_icp_match); return res; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 70dba70eb15..147c2e80be3 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -8107,9 +8107,9 @@ SHOW_VAR status_vars[]= { {"Handler_mrr_extra_rowid_sorts", (char*) offsetof(STATUS_VAR, ha_mrr_extra_rowid_sorts), SHOW_LONG_STATUS}, {"Handler_mrr_init", (char*) offsetof(STATUS_VAR, ha_multi_range_read_init_count), SHOW_LONG_STATUS}, #endif + {"Handler_icp_attempts ", (char*) offsetof(STATUS_VAR, ha_icp_attempts), SHOW_LONG_STATUS}, + {"Handler_icp_match", (char*) offsetof(STATUS_VAR, ha_icp_match), SHOW_LONG_STATUS}, {"Handler_prepare", (char*) offsetof(STATUS_VAR, ha_prepare_count), SHOW_LONG_STATUS}, - {"Handler_pushed_index_cond_checks",(char*) offsetof(STATUS_VAR, ha_pushed_index_cond_checks), SHOW_LONG_STATUS}, - {"Handler_pushed_index_cond_filtered",(char*) offsetof(STATUS_VAR, ha_pushed_index_cond_filtered), SHOW_LONG_STATUS}, {"Handler_read_first", (char*) offsetof(STATUS_VAR, ha_read_first_count), SHOW_LONG_STATUS}, {"Handler_read_key", (char*) offsetof(STATUS_VAR, ha_read_key_count), SHOW_LONG_STATUS}, {"Handler_read_next", (char*) offsetof(STATUS_VAR, ha_read_next_count), SHOW_LONG_STATUS}, diff --git a/sql/sql_class.h b/sql/sql_class.h index c04af55a127..3b94270ae08 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -588,8 +588,8 @@ typedef struct system_status_var ulong ha_tmp_update_count; ulong ha_tmp_write_count; ulong ha_prepare_count; - ulong ha_pushed_index_cond_checks; - ulong ha_pushed_index_cond_filtered; + ulong ha_icp_attempts; + ulong ha_icp_match; ulong ha_discover_count; ulong ha_savepoint_count; ulong ha_savepoint_rollback_count; diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc index 15b5efbfacb..a960c63e782 100644 --- a/sql/sql_join_cache.cc +++ b/sql/sql_join_cache.cc @@ -4026,9 +4026,9 @@ bool bka_skip_index_tuple(range_seq_t rseq, range_id_t range_info) JOIN_CACHE_BKA *cache= (JOIN_CACHE_BKA *) rseq; THD *thd= cache->thd(); bool res; - status_var_increment(thd->status_var.ha_pushed_index_cond_checks); - if ((res= cache->skip_index_tuple(range_info))) - status_var_increment(thd->status_var.ha_pushed_index_cond_filtered); + status_var_increment(thd->status_var.ha_icp_attempts); + if (!(res= cache->skip_index_tuple(range_info))) + status_var_increment(thd->status_var.ha_icp_match); DBUG_RETURN(res); } @@ -4505,9 +4505,9 @@ bool bkah_skip_index_tuple(range_seq_t rseq, range_id_t range_info) JOIN_CACHE_BKAH *cache= (JOIN_CACHE_BKAH *) rseq; THD *thd= cache->thd(); bool res; - status_var_increment(thd->status_var.ha_pushed_index_cond_checks); - if ((res= cache->skip_index_tuple(range_info))) - status_var_increment(thd->status_var.ha_pushed_index_cond_filtered); + status_var_increment(thd->status_var.ha_icp_attempts); + if (!(res= cache->skip_index_tuple(range_info))) + status_var_increment(thd->status_var.ha_icp_match); DBUG_RETURN(res); } |