mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Bug #13117023: Innodb increments handler_read_key when it should not
The counter handler_read_key (SSV::ha_read_key_count) is incremented incorrectly. The mysql server maintains a per thread system_status_var (SSV) object. This object contains among other things the counter SSV::ha_read_key_count. The purpose of this counter is to measure the number of requests to read a row based on a key (or the number of index lookups). This counter was wrongly incremented in the ha_innobase::innobase_get_index(). The fix removes this increment statement (for both innodb and innodb_plugin). The various callers of the innobase_get_index() was checked to determine if anybody must increment this counter (if they first call innobase_get_index() and then perform an index lookup). It was found that no caller of innobase_get_index() needs to worry about the SSV::ha_read_key_count counter.
This commit is contained in:
@ -2571,6 +2571,17 @@ SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
|
||||
# Clean up after the Bug#55284/Bug#58912 test case.
|
||||
DROP TABLE bug58912;
|
||||
|
||||
#
|
||||
# Test fix for bug 13117023. InnoDB increments HA_READ_KEY_COUNT (aka
|
||||
# HANDLER_READ_KEY) when it should not.
|
||||
#
|
||||
create table t1 (f1 integer primary key) engine=innodb;
|
||||
flush status;
|
||||
show status like "handler_read_key";
|
||||
select f1 from t1;
|
||||
show status like "handler_read_key";
|
||||
drop table t1;
|
||||
|
||||
#######################################################################
|
||||
# #
|
||||
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
|
||||
|
Reference in New Issue
Block a user