Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c299e027
Commit
c299e027
authored
Feb 22, 2012
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed names of statistic variables and counting matches instaed of rejected rows.
parent
c9fc9f73
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
65 additions
and
65 deletions
+65
-65
mysql-test/include/icp_tests.inc
mysql-test/include/icp_tests.inc
+3
-3
mysql-test/r/innodb_icp.result
mysql-test/r/innodb_icp.result
+9
-9
mysql-test/r/join_cache.result
mysql-test/r/join_cache.result
+12
-12
mysql-test/r/maria_icp.result
mysql-test/r/maria_icp.result
+9
-9
mysql-test/r/myisam_icp.result
mysql-test/r/myisam_icp.result
+9
-9
mysql-test/r/status.result
mysql-test/r/status.result
+4
-4
mysql-test/r/status_user.result
mysql-test/r/status_user.result
+2
-2
mysql-test/t/join_cache.test
mysql-test/t/join_cache.test
+4
-4
sql/handler.cc
sql/handler.cc
+3
-3
sql/mysqld.cc
sql/mysqld.cc
+2
-2
sql/sql_class.h
sql/sql_class.h
+2
-2
sql/sql_join_cache.cc
sql/sql_join_cache.cc
+6
-6
No files found.
mysql-test/include/icp_tests.inc
View file @
c299e027
...
...
@@ -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
;
mysql-test/r/innodb_icp.result
View file @
c299e027
...
...
@@ -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;
mysql-test/r/join_cache.result
View file @
c299e027
...
...
@@ -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;
#
...
...
mysql-test/r/maria_icp.result
View file @
c299e027
...
...
@@ -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;
mysql-test/r/myisam_icp.result
View file @
c299e027
...
...
@@ -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;
#
...
...
mysql-test/r/status.result
View file @
c299e027
...
...
@@ -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
...
...
mysql-test/r/status_user.result
View file @
c299e027
...
...
@@ -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
...
...
mysql-test/t/join_cache.test
View file @
c299e027
...
...
@@ -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
;
...
...
sql/handler.cc
View file @
c299e027
...
...
@@ -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_check
s
);
h
->
increment_statistics
(
&
SSV
::
ha_
icp_attempt
s
);
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
;
}
...
...
sql/mysqld.cc
View file @
c299e027
...
...
@@ -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
},
...
...
sql/sql_class.h
View file @
c299e027
...
...
@@ -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_check
s
;
ulong
ha_
pushed_index_cond_filtered
;
ulong
ha_
icp_attempt
s
;
ulong
ha_
icp_match
;
ulong
ha_discover_count
;
ulong
ha_savepoint_count
;
ulong
ha_savepoint_rollback_count
;
...
...
sql/sql_join_cache.cc
View file @
c299e027
...
...
@@ -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_check
s
);
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_attempt
s
);
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_check
s
);
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_attempt
s
);
if
(
!
(
res
=
cache
->
skip_index_tuple
(
range_info
)))
status_var_increment
(
thd
->
status_var
.
ha_
icp_match
);
DBUG_RETURN
(
res
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment