Commit b9df4d2a authored by Nikita Malyavin's avatar Nikita Malyavin Committed by Sergei Golubchik

Fix real keyread count for partitions

Sergei's commit ac6b3c44 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)
parent e6af6218
......@@ -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
......
......@@ -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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment