mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
Fix real keyread count for partitions
Sergei's commit ac6b3c4430
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)
This commit is contained in:
parent
e6af62189e
commit
b9df4d2a35
2 changed files with 5 additions and 4 deletions
|
@ -546,7 +546,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
|
||||||
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
|
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
|
||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
HANDLER_COMMIT 1
|
HANDLER_COMMIT 1
|
||||||
HANDLER_READ_KEY 2
|
HANDLER_READ_KEY 1
|
||||||
HANDLER_TMP_WRITE 24
|
HANDLER_TMP_WRITE 24
|
||||||
HANDLER_UPDATE 2
|
HANDLER_UPDATE 2
|
||||||
HANDLER_WRITE 2
|
HANDLER_WRITE 2
|
||||||
|
@ -628,7 +628,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
|
||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
HANDLER_COMMIT 4
|
HANDLER_COMMIT 4
|
||||||
HANDLER_DELETE 2
|
HANDLER_DELETE 2
|
||||||
HANDLER_READ_KEY 3
|
HANDLER_READ_KEY 2
|
||||||
HANDLER_READ_NEXT 1
|
HANDLER_READ_NEXT 1
|
||||||
HANDLER_READ_RND_NEXT 112
|
HANDLER_READ_RND_NEXT 112
|
||||||
HANDLER_ROLLBACK 1
|
HANDLER_ROLLBACK 1
|
||||||
|
@ -651,7 +651,7 @@ VARIABLE_NAME VARIABLE_VALUE
|
||||||
HANDLER_COMMIT 5
|
HANDLER_COMMIT 5
|
||||||
HANDLER_DELETE 2
|
HANDLER_DELETE 2
|
||||||
HANDLER_READ_FIRST 1
|
HANDLER_READ_FIRST 1
|
||||||
HANDLER_READ_KEY 3
|
HANDLER_READ_KEY 2
|
||||||
HANDLER_READ_NEXT 4
|
HANDLER_READ_NEXT 4
|
||||||
HANDLER_READ_RND_NEXT 140
|
HANDLER_READ_RND_NEXT 140
|
||||||
HANDLER_ROLLBACK 1
|
HANDLER_ROLLBACK 1
|
||||||
|
@ -671,7 +671,7 @@ VARIABLE_NAME VARIABLE_VALUE
|
||||||
HANDLER_COMMIT 5
|
HANDLER_COMMIT 5
|
||||||
HANDLER_DELETE 2
|
HANDLER_DELETE 2
|
||||||
HANDLER_READ_FIRST 1
|
HANDLER_READ_FIRST 1
|
||||||
HANDLER_READ_KEY 3
|
HANDLER_READ_KEY 2
|
||||||
HANDLER_READ_NEXT 4
|
HANDLER_READ_NEXT 4
|
||||||
HANDLER_READ_RND_NEXT 168
|
HANDLER_READ_RND_NEXT 168
|
||||||
HANDLER_ROLLBACK 1
|
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;
|
int error= HA_ERR_KEY_NOT_FOUND;
|
||||||
DBUG_ENTER("ha_partition::index_read_idx_map");
|
DBUG_ENTER("ha_partition::index_read_idx_map");
|
||||||
|
decrement_statistics(&SSV::ha_read_key_count);
|
||||||
|
|
||||||
if (find_flag == HA_READ_KEY_EXACT)
|
if (find_flag == HA_READ_KEY_EXACT)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue