summaryrefslogtreecommitdiff
path: root/mysql-test/r
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 /mysql-test/r
parent764eeeee74f999fe2107fc362236563be0025093 (diff)
downloadmariadb-git-607aab9c1d68a3b80bdb52a6c73fd6be1aa52764.tar.gz
Counters for Index Condition Pushdown added (MDEV-130).
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/innodb_icp.result27
-rw-r--r--mysql-test/r/join_cache.result17
-rw-r--r--mysql-test/r/maria_icp.result27
-rw-r--r--mysql-test/r/myisam_icp.result27
-rw-r--r--mysql-test/r/status.result6
-rw-r--r--mysql-test/r/status_user.result2
6 files changed, 105 insertions, 1 deletions
diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result
index 08238289330..ccbae98d137 100644
--- a/mysql-test/r/innodb_icp.result
+++ b/mysql-test/r/innodb_icp.result
@@ -808,5 +808,32 @@ COUNT(*)
1478
SET optimizer_switch=@save_optimizer_switch;
DROP TABLE t1,t2;
+# check "Handler_pushed" status varuiables
+CREATE TABLE t1 (
+c1 CHAR(1),
+c2 CHAR(1),
+KEY (c1)
+);
+INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5');
+flush status;
+show status like "Handler_pushed%";
+Variable_name Value
+Handler_pushed_index_cond_checks 0
+Handler_pushed_index_cond_filtered 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%";
+Variable_name Value
+Handler_pushed_index_cond_checks 2
+Handler_pushed_index_cond_filtered 1
+SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
+c1 c2
+4 4
+show status like "Handler_pushed%";
+Variable_name Value
+Handler_pushed_index_cond_checks 2
+Handler_pushed_index_cond_filtered 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 dda0f4c8f66..6908f40e854 100644
--- a/mysql-test/r/join_cache.result
+++ b/mysql-test/r/join_cache.result
@@ -3506,6 +3506,7 @@ insert into t2 values (2,1, 'qwerty'),(2,2, 'qwerty'),(2,3, 'qwerty'),
insert into t2 values (3,1, 'qwerty'),(3,4, 'qwerty');
insert into t2 values (4,1, 'qwerty'),(4,2, 'qwerty'),(4,3, 'qwerty'),
(4,4, 'qwerty');
+flush status;
set join_cache_level=5;
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;
@@ -3519,6 +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%";
+Variable_name Value
+Handler_pushed_index_cond_checks 20
+Handler_pushed_index_cond_filtered 16
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;
@@ -3532,6 +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%";
+Variable_name Value
+Handler_pushed_index_cond_checks 40
+Handler_pushed_index_cond_filtered 32
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;
@@ -3545,6 +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%";
+Variable_name Value
+Handler_pushed_index_cond_checks 60
+Handler_pushed_index_cond_filtered 48
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;
@@ -3558,6 +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%";
+Variable_name Value
+Handler_pushed_index_cond_checks 80
+Handler_pushed_index_cond_filtered 64
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 2d2b4d0c1f7..b9d3ca6c7c0 100644
--- a/mysql-test/r/maria_icp.result
+++ b/mysql-test/r/maria_icp.result
@@ -814,5 +814,32 @@ COUNT(*)
1478
SET optimizer_switch=@save_optimizer_switch;
DROP TABLE t1,t2;
+# check "Handler_pushed" status varuiables
+CREATE TABLE t1 (
+c1 CHAR(1),
+c2 CHAR(1),
+KEY (c1)
+);
+INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5');
+flush status;
+show status like "Handler_pushed%";
+Variable_name Value
+Handler_pushed_index_cond_checks 0
+Handler_pushed_index_cond_filtered 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%";
+Variable_name Value
+Handler_pushed_index_cond_checks 2
+Handler_pushed_index_cond_filtered 1
+SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
+c1 c2
+4 4
+show status like "Handler_pushed%";
+Variable_name Value
+Handler_pushed_index_cond_checks 2
+Handler_pushed_index_cond_filtered 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 c480e35df42..3171753adb4 100644
--- a/mysql-test/r/myisam_icp.result
+++ b/mysql-test/r/myisam_icp.result
@@ -812,6 +812,33 @@ COUNT(*)
1478
SET optimizer_switch=@save_optimizer_switch;
DROP TABLE t1,t2;
+# check "Handler_pushed" status varuiables
+CREATE TABLE t1 (
+c1 CHAR(1),
+c2 CHAR(1),
+KEY (c1)
+);
+INSERT INTO t1 VALUES ('3', '3'),('4','4'),('5','5');
+flush status;
+show status like "Handler_pushed%";
+Variable_name Value
+Handler_pushed_index_cond_checks 0
+Handler_pushed_index_cond_filtered 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%";
+Variable_name Value
+Handler_pushed_index_cond_checks 2
+Handler_pushed_index_cond_filtered 1
+SELECT * FROM t1 WHERE (c2='3' or c2='4') and c2 % 2 = 0 ;
+c1 c2
+4 4
+show status like "Handler_pushed%";
+Variable_name Value
+Handler_pushed_index_cond_checks 2
+Handler_pushed_index_cond_filtered 1
+DROP TABLE t1;
drop table if exists t0, t1, t1i, t1m;
#
# BUG#826935 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed
diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result
index b0744726390..e75cabe0e58 100644
--- a/mysql-test/r/status.result
+++ b/mysql-test/r/status.result
@@ -276,6 +276,8 @@ Handler_commit 0
Handler_delete 0
Handler_discover 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
@@ -297,7 +299,7 @@ Created_tmp_files 0
Created_tmp_tables 2
Handler_tmp_update 2
Handler_tmp_write 7
-Rows_tmp_read 35
+Rows_tmp_read 37
drop table t1;
CREATE TABLE t1 (i int(11) DEFAULT NULL, KEY i (i) ) ENGINE=MyISAM;
insert into t1 values (1),(2),(3),(4),(5);
@@ -311,6 +313,8 @@ Handler_commit 0
Handler_delete 0
Handler_discover 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 17c44df1d3c..175839b2098 100644
--- a/mysql-test/r/status_user.result
+++ b/mysql-test/r/status_user.result
@@ -101,6 +101,8 @@ Handler_commit 19
Handler_delete 1
Handler_discover 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