From b9df4d2a35f11c57c3a9e55117318d7fea034918 Mon Sep 17 00:00:00 2001 From: Nikita Malyavin Date: Tue, 19 Nov 2019 18:52:41 +1000 Subject: Fix real keyread count for partitions Sergei's commit ac6b3c44308b61eb implemented handler status counters compensation for underlying handlers like ha_partition. `index_read_idx_map` is missing there, but it should have been fixed as well (proof: ha_partition::index_read_idx_map never calls ha_partition::index_read_map). Note: all this compensation logic could be broken for subpartitions! (We can experience double decrement) --- sql/ha_partition.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/ha_partition.cc') diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 16000c8afca..be2e665d7e2 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -5837,6 +5837,7 @@ int ha_partition::index_read_idx_map(uchar *buf, uint index, { int error= HA_ERR_KEY_NOT_FOUND; DBUG_ENTER("ha_partition::index_read_idx_map"); + decrement_statistics(&SSV::ha_read_key_count); if (find_flag == HA_READ_KEY_EXACT) { -- cgit v1.2.1