diff --git a/mysql-test/main/partition_explicit_prune.result b/mysql-test/main/partition_explicit_prune.result index d9db35a249a..21741bdff73 100644 --- a/mysql-test/main/partition_explicit_prune.result +++ b/mysql-test/main/partition_explicit_prune.result @@ -546,7 +546,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; VARIABLE_NAME VARIABLE_VALUE HANDLER_COMMIT 1 -HANDLER_READ_KEY 2 +HANDLER_READ_KEY 1 HANDLER_TMP_WRITE 24 HANDLER_UPDATE 2 HANDLER_WRITE 2 @@ -628,7 +628,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; VARIABLE_NAME VARIABLE_VALUE HANDLER_COMMIT 4 HANDLER_DELETE 2 -HANDLER_READ_KEY 3 +HANDLER_READ_KEY 2 HANDLER_READ_NEXT 1 HANDLER_READ_RND_NEXT 112 HANDLER_ROLLBACK 1 @@ -651,7 +651,7 @@ VARIABLE_NAME VARIABLE_VALUE HANDLER_COMMIT 5 HANDLER_DELETE 2 HANDLER_READ_FIRST 1 -HANDLER_READ_KEY 3 +HANDLER_READ_KEY 2 HANDLER_READ_NEXT 4 HANDLER_READ_RND_NEXT 140 HANDLER_ROLLBACK 1 @@ -671,7 +671,7 @@ VARIABLE_NAME VARIABLE_VALUE HANDLER_COMMIT 5 HANDLER_DELETE 2 HANDLER_READ_FIRST 1 -HANDLER_READ_KEY 3 +HANDLER_READ_KEY 2 HANDLER_READ_NEXT 4 HANDLER_READ_RND_NEXT 168 HANDLER_ROLLBACK 1 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) {